June 10, 2020

Exploring ScrollToTextFragment

Buggy af for me...

Yesterday we launched quotebacks and I had a bunch of people suggesting that we integrate the scrolltotextfragment protocol to make the links point to the correct part of the page.

Great in theory!

However - in practice I’ve found the implementation super buggy.

First, what is ScrollToTextFragment?

In essence - ScrollToTextFragment allows you to deep-link to a specific part of a page, with the text highlighted. If you’re in Chrome it should work on any web-page. And Google is using this for their featured snippets (click through to the Verge article for screenshots):

Google is trying to make it easier to find the information you’re looking for on external websites by highlighting relevant sections in yellow, SearchEngineLand reports. The functionality works with Google’s Featured Snippets — the standalone boxes that appear at the top of search results that attempt to give you answers without having to visit a website beyond Google.

Nice in theory.

WTF?

In practice I see very inconsistent behavior:

And some URLs always fail - while others work sporadically (wtf!).

Here’s some examples:

This one doesn’t work for me

This one works for me

Do they work for you?

Grab the bookmarklet from over here to play around and generate your own.

Can anyone shine light on what’s going on? Comments welcome below or on Twitter.


⇜ PREVIOUS
This blog is written by Tom Critchlow, an independent strategy consultant living and working in Brooklyn, NY. If you like what you read please leave a comment below in the comments or sign up for my newsletter.