Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • But: please do not post links that only work with some client-side add-on installed. Only use them for, well, nowhere I guess! Commented Apr 23, 2011 at 7:23
  • @Arjan, you'll still be taken to the answer if the comment isn't displayed, so it isn't totally broken. Commented Apr 24, 2011 at 3:07
  • Ah, I thought it created new ids for linking, but now I see it uses the existing ids from the HTML. Still then: a URL can only have a single "fragment" like #comment-219500. Using the fragment to link to a specific comment, replaces the fragment that links to the answer. So: the regular /questions/88565/allow-linking-to-comments/88567#88567 becomes /questions/88565/allow-linking-to-comments/88567#comment-219500. If that comment is deleted or hidden (if there are many comments) then the browser will not scroll at all, so one will effectively see the question, not taken to the answer. Commented Apr 24, 2011 at 7:30
  • @Arjan, I've previously tested it with putting in a bogus id number for the comment and I still get scrolled to the answer. I forget what browsers I tested it in though. Commented Apr 24, 2011 at 16:48
  • That makes me curious, Rebecca! I really cannot see how a URL could have two fragments, and how the stock Stack Exchange HTML could ever handle that. And: I'm quite sure they simply don't. Maybe that user script fetches all comments (even if it does not show them)? Then we're back at my earlier concern: don't trust the URL to work when not having the script installed. That said: on Meta, I often do link to comments in answers, as some source of some statement. Shame on me... ;-) Commented Apr 24, 2011 at 22:12