2

Recently I have noticed Google search results in Firefox to have a different font, from both google.co.uk and google.com (I use both).

I've made two attempts to override the font. One is by installing the Firefox extension Stylus; the other is by adding a configuration file to my Firefox profile in about:support. I clear the browser cache and restart. At first they both work, but then they revert to the poor rendering.

This is the original:

enter image description here

This is what I don't like:

enter image description here

which has a different font, size and letter spacing, and is more difficult to read (hence the question). The font change is most noticeable in the uppercase I.

Now, everything is OK with or without those mods to Firefox, until I log into either Stack Overflow or Stack Exchange. Then the Google font changes.

I've also consulted with colleagues who (don't use SE) and report no changes to the Google search results font.

What has happened? I've noticed that Stack Exchange is ceaselessly tinkering with the format.

11
  • 6
    I admit that I'd be impressed if Stack Exchange found a way to affect the font of different sites, or contents not part of SE itself. That said, I really can't see any way in which it's possible. So this requires much more intensive checks, e.g. when you login SE the font changes, but when you logout, does it change back to normal? Also, what you mean "either Stack Overflow or Stack Exchange"? They're the same, i.e. SO is part of SE. Also, if you login incognito, then use Google search, is the font borked there as well? Commented Oct 11 at 20:07
  • 1
    If this is possible that would be a browser bug. The most likely case then would be that this affects the cached copy of the font, but nowadays browser almost never share caches between websites as that is a security risk. SE doesn't use any web fonts, so even this very remote possibility does not seem plausible. Commented Oct 11 at 20:21
  • 1
    You probably just got an A/B test. Google runs them constantly. Site isolation is pretty good these days, and sites can't just replace a font you have installed.
    – vandench
    Commented Oct 11 at 20:25
  • @vandench I've been exploring this for several days now, and tried a variety of things, as mentioned in the post. The one common factor is logging into SE or SO. It's not enough just to access the sites: I have to log in (I have Firefox set to destroy cookies on exit). Commented Oct 11 at 20:28
  • Let's suppose for a second that SE has managed to find a cross site vulnerability to change fonts. You're supposing that they then decided to also change the CSS and possibly HTML structure of the result headers for the current version of Google's frontend (the class names are obfuscated on Google, so they change every time they update the frontend). That pill around the site name is a pretty stark difference.
    – vandench
    Commented Oct 11 at 20:33
  • 4
    @vandench I'm not supposing anything: that's you. One reason for posting is that another user might report the same thing. And remote sites can use fonts that I have not installed. I'm trying to find the cause of the behaviour. I don't post lightly, having been mangled in the past. Commented Oct 11 at 20:47
  • 1
    Yes, websites can use any font they want, but they can't replace your installed fonts, and they can't change the font selection on other sites.
    – vandench
    Commented Oct 11 at 20:49
  • @vandench OK, so unless anyone else can confirm the behaviour, my next step will be to find out how to opt of of the "A/B test. Google runs them constantly". And I'm not suggesting that SE "decided to also change the CSS and possibly HTML structure of the result headers for the current version of Google's frontend". That's your take. You're annoying me now. Can you contribute something useful, please. Commented Oct 11 at 20:53
  • 2
    By posting here I am exploring one possible avenue. The site does make mistakes, for example on SO recently the 'newest question' option was malfunctioning for a while and then was working properly. Commented Oct 11 at 21:03
  • Should use the system fonts.
    – bad_coder
    Commented Oct 12 at 21:11
  • Please don't edit your question to post an answer. You can do a self-answer, but if you feel like others have answered the question sufficiently, you can also upvote or accept their answers.
    – Anerdw
    Commented Oct 12 at 22:44

2 Answers 2

7

No, Stack Exchange has not discovered a vulnerability to change the font on your system or on other websites. Nor have they discovered an XSS vulnerability to inject scripts into Google, as would be needed to recreate these results.

Google has changed their site, something they do frequently, likely in an A/B test.

When I visit google.com I get results like shown in your first image. However when I visit google.co.uk I get results like shown in your second image.

You mentioned the font, but there are more differences than just the font. A notable one is the result header. In the first image the result has the icon on the left, with the title of the site above the URL on the right. In the second image the icon and title are on the left in a grey pill, with the URL on the right.

Changes like that require more than just an overwritten font; that would require injecting a script into Google to change the DOM. Unsurprisingly, everyone has agreed that that is terrible for security, so browsers work very hard to prevent that, as such XSS vulnerabilities are rare.

Here is the view I get on google.com:

Search result on google.com

And here is the source code for the header:

<div class="q0vns">
    <span class="DDKf1c">
        <div class="eqA2re UnOTSe Vwoesf" aria-hidden="true">
            <img class="XNo5Ab" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABzElEQVR4Ab2WAUQDURjHDw0QIAQkAVBaMwvDJiMbY7QgFgAkAAGZZUASFiyAnQUEotMIGUKgAAYNWxY20Gyv9+d57d52X99mN/zcuee933vv/b+7sxKnyX9pxUORVixUkNe6pCMRQN3XVVuEMxbZ2E4Ej7WARwd9phbKGa/Izg2+aIwGxmAJsTUSMRcmSP2UFcgVqm0UDBzJjcKhZYSQcWZZIsVZjgz8pTEaGniI6mYnQnzCKothzfruFteFKeXL+Fh9J7DdfwyI4ZMlcIUUQDhnmRZeQDTKV3ZLnYU/wmdTiNWenReXqY6xQq8suZ6C8m6psiKFS21TiGeUTAnFDCQsQ6aEgRd/hN3c4oWL3VIIjdAgMMzQNCXvHjS9z1CVxWgtHt4lxaadIcuCkWBhgpS6Cv/jYU0E7YyGL+Ftt+vVVr0PidXKgUu4Y2de57U6PNfCVDWVM2WzSGP5nzwRmg0tBHLgTwg8pD3JkZcoaKfDmFj08k3E84NJstrY9xAHaoi85I6kpMB9T7dX90Tk9sqUuhI/NlNCxkJJXaVgfg99keKKQmf9JmJ7iTNlkg5P/SOMoOgzYmK+MGghkUIMpEKiV457pFMFaJ8z1i/ATnOr+aZzdAAAAABJRU5ErkJggg==" style="height:26px;width:26px" alt="" data-csiid="jfEJZ5z2J7jlwN4P7aK3wQs_7" data-atf="4">
        </div>
    </span>
    <div class="CA5RN">
        <div>
            <span class="VuuXrf">About Google</span>
        </div>
        <div class="byrV5b">
            <cite class="tjvcx GvPZzd cHaqb" role="text">https://about.google</cite>
        </div>
    </div>
</div>

Here is the view I get for google.co.uk:

Search result on google.co.uk

And here is the source code for the header:

<div class="q0vns">
    <span class="idGHzb">
        <span class="IvHA0">
            <span class="DDKf1c">
                <div class="eqA2re UnOTSe Vwoesf" aria-hidden="true">
                    <img class="XNo5Ab" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAABzElEQVR4Ab2WAUQDURjHDw0QIAQkAVBaMwvDJiMbY7QgFgAkAAGZZUASFiyAnQUEotMIGUKgAAYNWxY20Gyv9+d57d52X99mN/zcuee933vv/b+7sxKnyX9pxUORVixUkNe6pCMRQN3XVVuEMxbZ2E4Ej7WARwd9phbKGa/Izg2+aIwGxmAJsTUSMRcmSP2UFcgVqm0UDBzJjcKhZYSQcWZZIsVZjgz8pTEaGniI6mYnQnzCKothzfruFteFKeXL+Fh9J7DdfwyI4ZMlcIUUQDhnmRZeQDTKV3ZLnYU/wmdTiNWenReXqY6xQq8suZ6C8m6psiKFS21TiGeUTAnFDCQsQ6aEgRd/hN3c4oWL3VIIjdAgMMzQNCXvHjS9z1CVxWgtHt4lxaadIcuCkWBhgpS6Cv/jYU0E7YyGL+Ftt+vVVr0PidXKgUu4Y2de57U6PNfCVDWVM2WzSGP5nzwRmg0tBHLgTwg8pD3JkZcoaKfDmFj08k3E84NJstrY9xAHaoi85I6kpMB9T7dX90Tk9sqUuhI/NlNCxkJJXaVgfg99keKKQmf9JmJ7iTNlkg5P/SOMoOgzYmK+MGghkUIMpEKiV457pFMFaJ8z1i/ATnOr+aZzdAAAAABJRU5ErkJggg==" style="height:26px;width:26px" alt="" data-csiid="hvEJZ8mIJIXEp84P8KmO8A8_6" data-atf="4">
                </div>
            </span>
            <div>
                <span class="VuuXrf">About Google</span>
            </div>
        </span>
    </span>
    <div class="byrV5b" style="overflow:auto">
        <cite class="tjvcx GvPZzd cHaqb" role="text">https://about.google</cite>
    </div>
</div>

You'll notice that the while the class of the outer most div is the same, the class of the first span is different. Beyond that, there are also changes in the structure, with the second one using more spans.

Why is it correlated with logging into Stack Exchange?

¯\_(ツ)_/¯

How Google works is a mystery to everyone but Google.

If I had to guess, when you login into Stack Exchange, one of the Google Analytics scripts that Stack Exchange has on their site installs a cross-site cookie which triggers the A/B test. In the past google has run specific A/B tests for targeted audiences, it's plausible that they're specifically targeting this test at developers for some reason, or maybe it's targeted at users of "forum" like sites.

How can you opt out this?

As far as I can tell, you can't. I know GMail let's you revert to older styles sometimes, but I'm not seeing anything for Google search.

You can however give feedback. If you click on your user icon in the top right corner, and click on 'More settings', there is a feedback link on the bottom of the page. Given this appears to be an A/B test, it's very likely that the feedback will be associated with the A/B test.

3
  • 2
    Since a few months there is this "continue with Google" popup on SE sites. Maybe that popup, once served, set a cookie on Google's end.
    – rene Mod
    Commented Oct 12 at 7:29
  • @rene thanks, I checked that. Even clicking the popup (but without logging in) does not affect the font, but logging in to Google does. Commented Oct 12 at 9:30
  • @vandench thanks, I have posted feedback as you advise. Commented Oct 12 at 9:31
5

The font issue is unrelated to Stack Exchange.

I have solved it by changing my login method. I created a new login without using Google. The only downside is that I lose the one-click login to a sister site such as Stack Overflow.

So now the font used on the Google search pages remains unchanged.

1
  • I can use GitHub to log in to Stack Overflow, but unfortunately not to Stack Exhange sites. Commented Oct 12 at 12:32

Not the answer you're looking for? Browse other questions tagged .