logoalt Hacker News

socalgal2today at 7:45 AM3 repliesview on HN

> I would also try to add a human-readable slug at the end, because…

No? Because what would it be based on and if you edited the thing that it's based on then the URL would either change, or get out of sync which woudl suck. You could ignore the suffix meaning flickr.com/mwichary/sets/72177720330077904-<everything-past-the-previous-dash-is-ignored> I'm not sure if that would be a positive, although I guess S.O. does something like that. The issue is other sites really want to know if it's a link to the same resource or a different resource. And while you could redirect to the new one that just makes more work for everyone.

> I would get rid of /photos

I wouldn't because then you'd had have https://flickr.com/settings but that would not be a user named "settings" and the same for every other alternate purpose URL


Replies

shaknatoday at 9:49 AM

> The issue is other sites really want to know if it's a link to the same resource or a different resource.

Thats what the canonical link is for, isn't it? [0]

RFC 6596 introduced it in 2012. Other websites, like search engines or social media, have been using it for a while.

[0] https://developers.google.com/search/docs/crawling-indexing/...

KomoDtoday at 8:03 AM

> You could ignore the suffix meaning flickr.com/mwichary/sets/72177720330077904-<everything-past-the-previous-dash-is-ignored> I'm not sure if that would be a positive, although I guess S.O. does something like that.

That's usually how people do it.

show 1 reply
Macuyikotoday at 5:46 PM

What I typically end up doing is just recalc the slug and see if it matches the provided one. If it doesn't redirect to the most up to date slug matching the id. Though who knows if those old SEO patterns still matter these days...