Google adds a (dangerous) Firefox tune-up

From the Google Blog:

Now Google’s faster than ever on Firefox and Mozilla browsers. When you do a search on these browsers, we instruct them to download your top search result in advance, so if you click on it, you’ll get to that page even more quickly.

I’m not so sure I like this idea. It’s basically the “I feel lucky” option with an extra click. On a broadband connection, would I even notice the difference? On a dial-up connection, which I had to suffer with last week, it would impose a performance penalty. I’d prefer it if this were an option.

And why only for Firefox? Is there a technical reason why this can’t be done for another browser?

Updated: The more I think about this, the less I like it. What if the top search result contains content that is objectionable? If I do a perfectly legitimate search on my work computer, I have the option to avoid downloading that page based on its summary and title. But if the page downloads for me, it goes through my company’s proxy servers, where it gets logged as something I downloaded. It’s also cached on my computer. If that page happens to include porn or other unwanted content, I could get in serious trouble and even lose my job, even though I am completely innocent.

Google Help explains how to disable this feature in Firefox:

  1. Type “about:config” the address bar.
  2. Scroll down to the setting “network.prefetch-next” and set the value to “False”.

The default should be off, not on, in my opinion. A browser should never, ever download content from a site that you didn’t specifically choose to visit. What are Google’s developers thinking?

Updated again: In the comments, James Grimmelmann points out:

I agree with you that this combination is dangerous and that it should probably not be on by default for users. But I think the mistake is the browser’s, not Google’s.

After reading the Mozilla Prefetching FAQ, I think James is right. I’m particularly disturbed by this part:

A web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache… Will Mozilla prefetch documents from a different host? Yes. There is no same-origin restriction for link prefetching.  Limiting prefetching to only URLs from the the same server would not offer any increased browser security.

So, if I understand this correctly, a Web page designer can stuff a whole bunch of links into a page and tag them with the “prefetch” relation type. If I click on that page, all those links will begin downloading to my computer automatically, even if they are on other servers. And if I do a Google search using Firefox, this will happen automatically for the first page in the search results list.

I really, really don’t like this. It’s especially ugly if someone identifies a browser flaw that allows code to be executed automatically from a page that triggers a buffer overflow or exploits an unpatched scripting exploit.

Yet another update: See this follow-up article.

8 thoughts on “Google adds a (dangerous) Firefox tune-up

  1. I agree with you that this combination is dangerous and that it should probably not be on by default for users. But I think the mistake is the browser’s, not Google’s.

    I have good connectivity and no snoops (that I know of) watching my browsing. (And if I did, then I might want prefetching as a form of plausible deniability.) I love prefetching. I wouldn’t want Google to turn it off for me and deny me the option of having prefetching. But I wouldn’t mind having Firefox turn it off, since that’s a default that I could override by opting-in with a preference.

  2. The blame, if any, appears to be more Firefox’s than Google’s.

    Google just enabled their service to use a new proprietary Firefox feature, outlined on Mozilla.org here.

  3. Rob, you must have posted your comment as I was updating the item.

    I agree with both of you that the browser is the primary culprit here, but Google is taking it one dangerous step further by allowing a completely random page to be prefetched. At least with the default implementation I have to first click on a page before its links get fetched.

  4. The more I think about it, the more it makes me uneasy. I can’t quite articulate a scenario in which prefetching would bite me, but just reading your updates has convinced me that I don’t understand its implications well enough to say that it definitely won’t bite me.

    Despite my preference for speed-demon surfing, I’ve disabled prefetching for now.

  5. James, I think you might have it the wrong way around. Any substantial new privacy issues related to prefetching are the site’s fault, not the browser’s.

    There are lots of ways a site can cause your browser to load a page from another site without your knowledge: JavaScript tricks, hidden frames, etc. For legitimate uses, prefetching is preferable to these other methods, since the browser can be smart about only prefetching during idle periods. Disabling the prefetch feature will preclude these benefits without actually preventing malicious sites from loading remote pages.

    On the other hand, well intentioned sites like Google need to be careful about what prefetching they cause for precisely the reasons Ed cites. Google’s users trust it not to place embarrassing content in their caches or to connect their browsers to disreputable sites. Google says only certain sites are prefetched, and I’ll bet these concerns enter into their selection algorithm.

    Prefetching is also unlikely to exacerbate a vulnerability that “allows code to be executed automatically from a page that triggers a buffer overflow or exploits an unpatched scripting exploit.” The prefetched page is not rendered and any scripts it contains are not interpreted until the user actually follows a link to it. Only the HTTP and caching code is exposed to the prefetched data, and these relatively simple modules are less likely to contain exploitable holes.

  6. Possibly. But it’s equally likely, if not more so, that those are simply third-party cookies from sites that contain elements (such as ads) loaded from a different site.

    Try blocking third-party cookies to see if that reduces the number of “mystery” cookies.

Comments are closed.