Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Google highlighting sections of content

         

browndog

9:59 pm on Jan 23, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



I'm sorry if this has already been covered elsewhere. I just searched for a query and added my site name to guarantee I'd find. I asked a direct question 'can unicorns have widgets' and when I opened my page, the answer was highlighted in yellow. I was horrified, I thought I'd unintentionally highlighted the text so immediately hit edit and the highlighted portion wasn't there. So I tried again and the same thing happened. This is using the Chrome browser. Basically, it highlighted the answer 'yes, unicorns can have widgets', and then highlighted another sentence further down along the lines of 'in moderation because ...' As soon as I scroll, the yellow disappears.

I just tried the second and third results (because in typical Google style, the first result isn't relevant to the question), but they don't answer the question immediately, no portion of their content is highlighted.

Has anybody else seen this?

not2easy

4:29 am on Jan 24, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If a specific query and site are the search term they aim to find it for you. I'm sure it seemed weird, but they see it as answering just what you asked for, highlighting it to save you the trouble of finding that answer.

I haven't seen it myself, but I quit using Google for searches other than exact match a few years ago because of their deciding what I wanted. If you tried it on someone else's device you might get different results - or not.

TalkativeEditorial

3:31 pm on Jan 24, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



Yeah, this is their way of being 'helpful' for readers. Sometimes it also happens when clicking through from Featured Snippets. It can be useful, but obviously it's bad for the publisher of the content since time on page will be absolutely decimated and if you have Ads running.... the user might not even see a single one.

not2easy

4:04 pm on Jan 24, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



If you have not opted out of personalized results this is especially likely and particularly when you are logged in to your Google account. The Chrome Browser is their prime entry, your history and cookies are weighed in. Adding your site name to the search query was icing on it so they were sure you would be pleased.

I do not think that people in general understand how biased their search results are, yet many use their own searches to verify or monitor their success (or lack of it). GSC tells you where you rank in your target market area and gives some indication of what terms your properties show up for, including position relative to the search that they are being shown for. Your own searches are what they decide you want to see, not so useful for figuring out what others might see.

My comments here do not apply to everyone 100% all the time because of various settings and options available to all of us, but at their defaults, that is 'normal' and expected behavior.

saladtosser

4:12 pm on Jan 24, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



>>>page will be absolutely decimated and if you have Ads running<<<

Very true, if publishers are hit badly there will be less incentive to keep publishing which will have a knock-on effect on google also, as less future content available and less revenue from sites that use AdSense!

TalkativeEditorial

4:56 pm on Jan 24, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



Or everyone can all just start doing the cheap and nasty content that looks like it "serves the user" but just games the system.

NickMNS

5:04 pm on Jan 24, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Anybody have any idea how this is done technically? How can you inject code from one site to another. There seems to be a crossing of line here.

not2easy

5:19 pm on Jan 24, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



@NickMNS - if you mean how does Google highlight the specific text? I believe that they highlighted the results displayed from cache, that it was not highlighted outside of the Google's results, but I may have misunderstood. Rereading it, I am not certain now, but I can't imagine they could somehow change the appearance on the site itself. That really would be a good question.

NickMNS

5:40 pm on Jan 24, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I have seen a few times and casually thought to myself, "how this done?". But now reading this thread that thought jumped back at me, and thinking more seriously I can't come up with straight forward way to achieve this. But the cache method would be possible. One thing is for sure, the next time I come across this I will definitely be using dev-tools to try I figure it out. But even then it wont be simple as the dev-tools will reset as you go from one domain to the next.

I have implemented a similar feature on my own site:
- when someone searches using a search box, they are directed to a link of the url of the page with the searched content;
- to the end of that url, append the div id of div that holds the content;
- inject a css class using JS to highlight the div;
- and finally, set a timeout to remove the class after some elapsed time.

But that was all within my own domain. The URL with div ID appended is the simple part, it works whenever the searched content is within it's own div (is this always case with the Google implementation?) and doesn't raise any cross-site issues. It is really the highlighting that is questionable part.

robzilla

1:04 pm on Jan 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



These are referred to as Text Fragments [web.dev]. It's a browser feature.

Text Fragments let you specify a text snippet in the URL fragment. When navigating to a URL with such a text fragment, the browser can emphasize and/or bring it to the user's attention.

Basically, you add #:~:text= to the and of a URL, followed by the text you want to highlight and link to. Try this URL, for example:
https://www.webmasterworld.com/google/5024544.htm#:~:text=It's%20a%20browser%20feature

not2easy

1:26 pm on Jan 25, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



@robzilla - It doesn't do anything trying your example (on FF 84.0.2) but I see that link is for Google Chrome WebDev so maybe it is a proprietary browser feature(?)

That would mean they could highlight searched text on a results page for Chrome users if not for all browsers.

NickMNS

1:35 pm on Jan 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



@Robzilla awesome find! Great info it explain it all.

So for those that wish to opt-out:

For sites that still wish to opt-out, we have proposed a Document Policy header value that they can send, so user agents will not process Text Fragment URLs. Since Document Policy is not yet shipped, we are running an origin trial to apply this policy as an intermediate solution. The ForceLoadAtTop origin trial is running from Chrome version 83 to 85.
Document-Policy: force-load-at-top


Here is the link to that section:
[web.dev...]
https://web.dev/text-fragments/#:~:For%20sites%20that%20still%20wish%20to%20opt-out,Document-Policy:%20force-load-at-top


All I can say is, it must be nice to be Google:
- Google exec: "I would like to implement this feature"
- Google programmer: "That is not possible"
- Google exec: "Make it possible"
- Google programmer: "I would need to change the programming language and the browser"
- Google exec: "So change those, what are you waiting for"

NickMNS

1:38 pm on Jan 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Follow-up to the above post/link: This feature doesn't work in this forum due to the server side redirects.

robzilla

1:59 pm on Jan 25, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It doesn't do anything trying your example (on FF 84.0.2) but I see that link is for Google Chrome WebDev so maybe it is a proprietary browser feature(?)

Yes, I should've mentioned it's not a standard browser feature. Support is currently limited to Chrome, Opera and Edge: [caniuse.com...]

Looks like it won't be coming to Firefox any time soon: [github.com...]

I guess we'll be seeing more and more of these type of URLs being shared and linked to. The feature itself is helpful, I think, from a user perspective, but the URLs do end up looking a little messy. Opting out presumably only breaks the scrolling and highlighting, it won't clean the URL.

Here is the link to that section:
https://web.dev/text-fragments/#:~:For%20sites%20that%20still%20wish%20to%20opt-out,Document-Policy:%20force-load-at-top

Don't forget the text parameter.

browndog

11:08 pm on Feb 2, 2021 (gmt 0)

5+ Year Member Top Contributors Of The Month



Very true, if publishers are hit badly there will be less incentive to keep publishing which will have a knock-on effect on google also, as less future content available and less revenue from sites that use AdSense!


I've gone from mid $*,*** to low $*** despite working consistently to improve the site and add fresh content. I'm in part-time work now and looking for full-time work. I'm not sure if I will close the site down or not. I now make less per day than I did when I started with Adsense in 2005.

I don't think it was good visually, but I can see the point, it shows you what you want to see quickly. As for impacting revenue, I find in my niche, the SERPs are full of articles written by insurance companies and food companies, despite my niche not being in insurance or food. So they're not showing Adsense anyway, but obviously publishing content to get eyeballs on their site and hopefully sell their products.

I haven't seen it myself, but I quit using Google for searches other than exact match a few years ago because of their deciding what I wanted.


I find this absolutely infuriating. I search for an exact term and they return the results with '10 best widgets', when that's not what I wanted. I wanted to know if the blue widget was safe for unicorns.