This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by peterlits zo
When I find my post has url likes:
https://dev.to/peterlitszo/docker-network-4047
Of course it is readable. But what happen if the author change his/her username?
I try to rename me as peterlitszoxxx, and I try to access the same post. I find it redirect to my new username! Awesome!
There are a lot of website use user's ID rather than username. I do not think it is a bad idea - Althorgh we loss the readable, but we will never change the user's ID (just because it is not readable).
But when we use a readable thing in the website, what happen if we want to change it? For example, the article in other website may hold the origin url to the post and we cannot change it. If the user change his/her username, the url will be broken.
Redirect is a good idea. We can let a user has a lot of usernames, and limit the speed of change his/her username. But what happen if another user want to use the username nobody using?
Unreadable url looks not well, but it is not a bad idea. and urls in the web are broken easily always. Using unreadable things can make the url avoid being broken rather than using readable things as ID.
This content originally appeared on DEV Community 👩‍💻👨‍💻 and was authored by peterlits zo
peterlits zo | Sciencx (2022-10-09T03:15:13+00:00) The username in dev.to. Retrieved from https://www.scien.cx/2022/10/09/the-username-in-dev-to/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.