Fixed Out of date browser message in search results

Chromaniac

Well-known member
Affected version
2.2
Sample Search

I do not think I noticed this on my site on 2.1 though it's possible.

Code:
<noscript><div class="blockMessage blockMessage--important blockMessage--iconic u-noJsOnly">JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.</div></noscript>
<div class="blockMessage blockMessage--important blockMessage--iconic js-browserWarning" style="display: none">You are using an out of date browser. It may not display this or other websites correctly.<br />You should upgrade or use an <a href="https://www.google.com/chrome/" target="_blank" rel="noopener">alternative browser</a>.</div>

this code is present in all page loads. i guess this is not a new thing and google search is just picking it up as page description for search result pages like usual? the ones which does not have a properly defined description. in my case, it mostly appears for nodes that do not have description written in backend. maybe i should add them now!
 
Seems like they should bring Chris's add on back?


In any case, the markup should be much further down the page and surfaced with css/etc into a relative/abs position div (without causing CLS) so that the search engines don't pick it up as the most valuable content
 
We have made a tweak here, but generally examples like this don't tend to manifest in "real" searches. The other common example of this is a site: search with no other keywords, where Google will basically guess in terms of the text to display.
 
The fix pertained to the out of date browser warning, rather than the JavaScript warning.

I've made a similar change there but there's no guarantee it will work as it really depends whether or not the Googlebot user agent executes the JavaScript I just added. However, on the assumption that a similar approach worked for the browser warning, it should hopefully work for the JavaScript warning too.

To be clear on why it shows this instead of the actual meta description, well, Google rarely simply show the meta description. It's not really worked like that for a long time. This is, on the whole, a great thing because it means the search result snippet is relevant. It will display a different snippet for different search terms, depending on what is searched for.

It will display the meta description if it believes it is relevant to your search, but in the sheer majority of cases the snippet in search results will display something relevant to what you're actually searching for. For some reason, Google thinks the content of the noscript tag is more relevant, though it does also pick up "gaming forum" elsewhere in your page. Your description doesn't explicitly say "gaming forum" within it. If you search for "gaming community forums" which does appear in your description, then that bit is more relevant so it does show your description as the snippet.

Anyway, hopefully you'll see an improvement from the next release onwards, but there's no saying that without that JavaScript warning it won't pick something else that seems irrelevant in some cases.
 
Looks like something that should just go away imo... if someone is using a browser that doesn't support JavaScript, I feel like they want a bad user experience on all websites they are on. So I say, let them have it. :)

google.com has JavaScript and there are no <noscript> tags there. 🤷🏻‍♂️
 
Top Bottom