Author Topic: Google to Let you Link Directly to a Word or Phrase in Chrome  (Read 331 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 35125
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
Google to Let you Link Directly to a Word or Phrase in Chrome
« on: February 17, 2019, 02:46:31 PM »


Google is adding a new feature to Chrome that lets you link directly to a word or phrase without the need of special markup on the web page. This will make it much easier to share a section of a page that is relevant to the person you are sending it to, rather than having them read the entire page.

According to a new Chromium Gerrit entry that was posted yesterday, Google is getting ready to add a new flag that will let you test the "Scroll-To-Text using a URL fragment" feature. This feature allows a Chrome user to link directly to a word or a phrase at a particular web page.


Gerrit Post

Google has been working on this feature since January 4th 2019 and hopes to make this part of the standards process so that it is available to all browsers, rather than just Chrome.

According to a design document, this feature is being created because less than 1% of Chrome users utilize the "Find in page" feature and by allowing users to link specifically to a certain section, it will make it easier for users to find the content they are looking for.

Quote
When following a link to read a specific part of a web page, finding the relevant part of the document after navigating can be cumbersome. This is especially true on mobile, where it can be difficult to find specific content when scrolling through long articles or using the browser's "find in page" feature. Fewer than 1% of clients use the "Find in Page" feature in Chrome on Android.

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.

This feature will use specialized URLs that depending on how they are crafted will either link directly to the first specified word on the page or to a range of words.

For example, to link to the first occurrence of the word "bleeping", an URL would be crafted like:

Quote
http://www.example.com#targetText=bleeping

If you wanted to link to a specific phrase, you would use an url that contains the first word followed by the last word in the phrase. For example, the phrase below would link to the first phrase that starts with "bleeping" and ends with "best".

Quote
http://www.example.com#targetText=bleeping,best

The Scroll-To-Text feature also has a use case when it comes to search engines. Using this feature, search result pages can link directly to the keyword that was searched for a user clicks on the search result.


Search engine usage case

This feature has not landed as of yet to Chrome Canary but should be available soon. When it becomes available, users will be able to use the chrome://flags#enable-text-fragment-anchor flag to test it.

It is expected live in Chrome 74.0.3706.0 stable or newer.