0

With this url https://stackoverflow.com/a/2386013/, the page would scroll to the top edge of the section(div) with id answer-2386013

enter image description here

and the url automatically changes to https://stackoverflow.com/questions/271526/avoiding-null-statements/2386013#2386013

with this url https://ell.stackexchange.com/questions/214080/how-do-i-complete-the-sentence-if-you-dont-mind/214113?noredirect=1#comment455655_214113

enter image description here

the page scroll a little more, to the specific comment (div) section in that answer

How does SE site implement this feature?

I understand the noredirect=1 part is a parameter of URL. I also understand the 455655 part is id of <li> element, which contains the div (comment section)

<li id="comment-455655">

I don't understand this the whole process of the feature. I guess this is a feature of IIS server + some protocol of HTML or JS + a feature of chrome. So, what are they, could someone please give some keywords I can dig with? Thanks in advance.


just padding #comment455655_214113 or #comment-455655 to the a/... url does not work

https://ell.stackexchange.com/a/214113?noredirect=1#comment455655_214113
WXJ96163
  • 53
  • 5
  • can you provide us your HTML code? also try to expand your link with `#{YOUR_ELEM_ID}` – Samet Conrad Mar 23 '20 at 09:02
  • @SametC There are 2 clickable urls, each would link you to an actual page, which contains the whole HTML code. If some specific part needs to be copied to here, I am willing to do that. directly expanding does not work either. – WXJ96163 Mar 23 '20 at 09:37

0 Answers0