Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

"these "embed the title" schemes are just abusing URLs as storage for content that simply should not be in the URL."

I don't look at it this way. I think readable URLs are part of the way the web was designed - this idea that URLs map to individual documents and not to an application that has to translate between the URL and the resource it represents.

Quite to the contrary: Having a database id in the URL is sticking model/data layer logic where it doesn't belong - the view layer of the APP.

As for the permalink problem on changing titles you can simply store a history of redirects for every title that the article has ever had to the current, active URL.



Having an id in the URL lets you have a key to uniquely query. Without it, you would have to disallow identical titles.

What benefit do you get from having a title in the URL?

I think of a URL as simply an easily repeatable parameter of a web request. The URL is only one parameter of the request, but it's the only one that's easy to repeat.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: