Link to a specific part of a webpage, if the author didn't create #named anchors within it?

1

I use named anchors as section links all the time, and it drives me nuts when I find a good resource on the web, but it's part of a longer page, and there are no anchors.

I want to send someone a link to "read this!", but it feels awkward saying "Read this, after you open the page hit ctrl-F and search for 'multiple messages' and that's the paragraph."

Is there a way to force the target of a link to jump to a particular part of the page, despite the author's omission?

Nate B

Posted 2019-10-03T22:37:19.597

Reputation: 11

Answers

1

It depends on the page if this is possible. The anchors are defined as ids within the source of a page. Even if the author did not provide links to sections, there might be some ids present at the page's source, which could be used as anchors. Let me explain through an example:

  1. Open the page you want to link to, e.g. https://superuser.com/questions/1488963/.
  2. Press Ctrl+U to view it's source.
  3. Press Ctrl+F and search for _id=" (Replace the underscore by a space!), see example below: enter image description here
  4. Any id can be used as a jump target. Search for one that is near to the section you want to link to, e.g. question.
  5. Craft the link by appending #ID to the page's URL: https://superuser.com/questions/1488963/#question

Click here to try the example. However, if there are no id's, it is not possible.

dirdi

Posted 2019-10-03T22:37:19.597

Reputation: 1 860