2

Linking to a specific part of a web page and Is there any way to bookmark or link to a section of a page without an anchor? have answers/comments that say that linking to a particular part of a page cannot be done unless that page has addressable items in it such as anchors.

But I'm really needing this for research: I need to paste URLs to any arbitrary section in any arbitrary page without requiring that page to have anchors (e.g., I would like a URL that essentially goes to http://www.zdnet.com/article/google-voice-beyond-gmail-get-voicemail-and-texts-using-any-email-client-you-want/ and searches down for "Filters are your friends")

I need this to work in a browser-agnostic manner, not requiring browser extensions (e.g., http://liveurls.mozdev.org/tech.html as referenced by https://stackoverflow.com/a/26590905/257924), not requiring use of Javascript inside the URL itself which will not execute due to obvious and correct security concerns, and not requiring cross-site scripting (https://stackoverflow.com/a/13294569/257924).

Is there some other way to do it such as some external website that provides a way to form a link to an arbitrary string of text within a page when that page lacks an anchor?

bgoodr
  • 2,372
  • 1
  • 25
  • 45
  • Someone posted a comment here, which showed up in my RSS feed back to my email account, but then when I went back here to find it, it had disappeared. Perhaps deleted. What it stated was this "I'm providing the link to the answer I found close to what you are searching for. See the answer at https://stackoverflow.com/a/17050627/3172664". Having looked at that, it seems it is not the answer as I'm looking for something that does not require changes to the web page at all. – bgoodr Aug 04 '18 at 16:38
  • Did you find a solution? I find myself to be in the exact same spot as you: trying to link to a specific part of a page I don't control and that doesn't contain any name/id refs. The best I could find was an RFC proposal using regex but that proposal is not implemented yet (if ever). – Lieven Keersmaekers Jan 02 '19 at 06:45
  • No solutions as of yet. – bgoodr Jan 02 '19 at 20:41

1 Answers1

1

Chrome(later than 74.0.3706.0) has an experimental feature ScrollToTextFragment which does exactly what you want

To enable scrolling directly to a specific part of a web page, we propose generalizing the existing support for scrolling to elements based on the fragment identifier. We believe this capability could be used by a variety of websites (e.g. search engine results pages, Wikipedia reference links), as well as by end users when sharing links from a browser.

...

Links are sometimes used as citations in web pages where the author wishes to substantiate a claim by referencing another page (e.g. references in wikipedia). These reference pages can often be large, so finding the exact passage that supports the claim can be very time consuming. By linking to the passage that supports their underlying claim, authors can make it more efficient for readers to follow their overall argument.

but the user have to turn on this experimental feature manually.

This feature is currently implemented as an experimental feature in Chrome 74.0.3706.0 and newer. It is not yet shipped to users by default. Users who wish to experiment with it can use chrome://flags#enable-text-fragment-anchor. The implementation is incomplete and doesn't necessarily match the specification in this document.

Gr8Miller
  • 13
  • 3
  • @bgoodr then the task must be done by browsers itself! since you don't want extension/scripts. `ScrollToTextFragment ` is the most approximate feature implemented by browsers, while currently it's not a part of spec, and only chrome supports it experimentally. – Gr8Miller Nov 17 '19 at 05:37
  • by the way, if chrome extension is acceptable, you can try [AnyLink](https://chrome.google.com/webstore/detail/any-link-safereliable-lin/mpflpgaobfpjcpefkdnpalfdodifkkgc) which is developed by me. – Gr8Miller Nov 17 '19 at 05:41
  • I understand, but I'm looking for something that doesn't rely on experimental extensions or not quite completed specifications. – bgoodr Nov 17 '19 at 18:44