What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

A tradition SO URL use format something like this:

http://stackoverflow.com/questions/123/foobar

My understanding when there is same title, a URL is

http://stackoverflow.com/questions/234/foobar

Why not instead use the following format?

http://stackoverflow.com/questions/foobar/123
http://stackoverflow.com/questions/foobar/234

Seems it is more natural and more restful, right?

Update: I am not saying only use slug as the only identifier, I just mean the order of the parameter. Since id is the unique identifer, it is better to put at the LAST part of the url.

share|improve this question
5  
Titles can change, question IDs can't. The proposed format would invalidate links if the titles are edited. –  NullUserException อ_อ Oct 26 '12 at 17:45
add comment

1 Answer 1

Not really. The number is the question ID that uniquely identifies the question. The title slug is entirely optional (and often truncated if it's too long, anyway):

http://stackoverflow.com/questions/123/foobar
http://stackoverflow.com/questions/123/

both lead to the same page.

Using the title as a primary identifier wouldn't make sense: it's not guaranteed to be unique, and could actually change if the question is edited.

share|improve this answer
1  
Or http://stackoverflowcom/123/not-really-the-title for that matter. –  NullUserException อ_อ Oct 26 '12 at 17:46
    
@Anna, I am not saying using slug as the primary identifier, id is still needed, I just mean just swap position! –  Howard Oct 27 '12 at 3:40
    
@Howard What happens when the title is edited? You'd break every link pointing to the question. My point is that titles could change, which is why they aren't required in the URL and come second. –  Anna Lear Oct 27 '12 at 3:41
    
@Anna, the system can still look up the new url from the id (which is still a required parameter, but put at the last position) –  Howard Oct 27 '12 at 3:44
    
@Howard That seems highly unintuitive. –  Anna Lear Oct 27 '12 at 3:45
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .