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

I might be an outlier, but I don't like slugs in URLs.

They make URLs unnecessarily long, often forcing people to use URL shorteners -- completely defeating the purpose.

They get awkward when the author changes the title. Other commenters mentioned some tricks to get around this issue, but all involve redirects. Cools URLs shouldn't change in the first place.

They don't copy cleanly if you use nonalphanumeric characters, as in nearly every language other than English.

Virtually nobody just looks at a URL these days anyway, with all the search engines, cute thumbnails, and OpenGraph metadata that provide a glimpse of the actual content for you before you even click on it. This is doubly true in the non-English-speaking parts of the world where a slug in a shared URL is often just a jumble of %HEX.

Hand-picked words in URLs are fine, e.g. /about/me. I'm only talking about autogenerated slugs for user-submitted content above.



> They don't copy cleanly if you use nonalphanumeric characters, as in nearly every language other than English.

I haven't noticed this ever being an issue.

At least in Firefox, non-ASCII characters will show as-is in the URL bar, but in the copied URL they will be properly encoded.


Of course they work properly once you paste them into a browser. But then you've visited the URL.

One alleged justification for slugs is that they allow people to guess what the URL is about without actually visiting it. This usually happens in forums, comments, text messages, and other places where people can only use plain text. But non-ASCII slugs look undecipherable in exactly such places.


On the other hand, slugs may save you a long page load. Which is useful for users with slow internet.


URL shorteners are more for UTM tracking codes. Those get long.




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

Search: