5

On Stack Overflow the link to an answer looks like this

https://stackoverflow.com/a/<answer-id>/<question-id>
// https://stackoverflow.com/a/69119825/819887

Out of curiosity:

  • Why was this format chosen (instead of just https://stackoverflow.com/a/<answer-id>/)
  • Are there any speed gains to include both ids (<question-id> and <answer-id>)?
  • Is there an article that explains why this URL scheme was used?
4

1 Answer 1

19

It doesn't. 819887 is a user ID, to be precise the one who clicked on the 'Share' link underneath the answer. You can see it in your profile as well: https://stackoverflow.com/users/819887/surfmuggle. This is to keep track of referrals for the Announcer badge and family.

Now, when you visit that link, you'll see that the final URL does contain both the question and answer ID:

https://stackoverflow.com/questions/69119268/how-do-i-roll-to-a-specific-browser-version-with-playwright/69119825#69119825

69119268 is the question ID, that's the canonical URL for SEO purposes. The answer ID 69119825 appears twice: once to make sure that you're on the right page if there are lots of answers; the #69119825 is the slug which makes your browser scroll to that answer.

You might be interested in Documentation for Stack Exchange engine URLs? and List of unlinked pages on Stack Exchange sites to learn more.

2
  • 2
    To be fair, the expanded answer link does contain both IDs, but that makes a little more sense with the question ID coming first: https://$site/questions/<Question-ID>/<Question-Title-Kebab-Case>/<Answer-ID>
    – zcoop98
    May 20 at 17:03
  • I hate links that contain useless titles in their path. I always strip them off when sharing them. May 21 at 4:40

You must log in to answer this question.

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