5

When I click share on a SE question, I get a link of the form:

http://stackoverflow.com/q/40464715/122687

But since I often need to paste in instant messaging or source code comments, I want it to be as short as possible, so I strip the /122687 part out and the link still works.

Can I rely on this continuing to work on the future, or am I setting myself up for problems?

My question applies not only to question links, but also to answer links such as http://stackoverflow.com/a/11227902/122687 where I remove the last part again, and it still works.

3
  • 2
    //stackoverflow.com/q/40464715 to have it even shorter. The last part is your user id, so that it counts towards the announcer badges. See also meta.stackoverflow.com/questions/274712/…
    – Tunaki
    Nov 7, 2016 at 12:19
  • 1
    @Tunaki That won't work (reliably) in instant messaging or source code comments. Or emails, since some clients (Outlook) use file:/// when detecting protocol-relative URLs.
    – user247702
    Nov 7, 2016 at 13:31
  • Shoulda gotten in on this whole deal sooner to get a shorter user id. Mine is a whole 3 characters shorter… ;-P
    – deceze Mod
    Dec 28, 2016 at 11:31

1 Answer 1

6

Yes, these links will continue to work without the user ID number on the end. The user ID is completely optional and only used for tracking the Announcer badge class - you will never be required to include it as that requirement would break short links for users who do not have an account on the site (try viewing a question in incognito - you get the same link without the second number).

You must log in to answer this question.

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