Firefox Prefetching Google Search Results

Google is taking advantage of a feature of the Mozilla open-source to prefetch the top search result.  So, if you search on something, the pages referenced in the first result will be loaded in the background.

Details at Google, GoogleBlog and Slashdot with an FAQ on the feature here.

When I found out about this feature, I had several reactions.  The first was "Cool!" Google has always done a lot to take advantage of client-side, user agent features, such as the keyboard support I helped build into Internet Explorer 3.0 and 4.0/4.01.

Another reaction was "Uh oh!"  I was worried that Google's implementation would be specific to Firefox and Mozilla browsers.  I'm a veteran of the original browser wars and remember Netscape trying to push the LAYER tag in the W3C HTML working group instead of using CSS positioning.  I worried that Mozilla might have created some PREFETCH tag or attribute.  In actuality, a few years ago, the Mozilla project added the Prefetch relation type to the LINK tag.  Google gives the following example if searching on "Standford" and the first result is Standford University.  In the results page, the following text would be located in the HTML source code:

<link rel="prefetch" href="http://www.stanford.edu/">

The purpose of the the REL attribute of the LINK element is to specify a relationship from the current page, to the linked page.  There are several link types defined.  The classic example is to give hints to navigation, such as specifying the next and previous pages in sequence.  I'll leave it to the HTML purists to debate whether or not prefetching is an acceptable use of the LINK element.  Personally, I think it's better to use a link type than to define a new element, or adding an PREFETCH attribute to the A element.

Finally, what I find amusing is the double-standard with regard to Mozilla vs. Microsoft.  Imagine the reaction of the Slashdot crowd if Microsoft had implemented this feature and got MSN Search to take advantage of it.  Oh, there would cries of colusion, and new calls for an anti-trust investigation.  I wonder if the next version of IE will support this feature.

Interestingly enough, Google apparently does not serve up the PREFETCH link type when using Internet Explorer.  It's possible that that Google is looking at the user agent string and serving up customized HTML to the browser.  This is unfortunate in this case because it'll require Google to change it's logic when other browsers support the feature.  Once again, imagine if MSN Search only provided this feature to Internet Explorer.

While I think of prefetching as a generally good idea, it's not without it's problems.  The prefetch page will be obtained regardless if you actually view it or not.  It may leave cookies and temporary files on your machine.  Your internet service provider (or IT department at work) will record that your computer accessed this page.  Imagine if you are doing research on sensitive subjects and the search result is objectionable to you, or your employer, then you'll might have to explain that you didn't actually visit the site in question.

Mozilla will add X-moz:prefetch as a header to the HTTP request, so the web server knows that it's a prefetch, but the ISP and web server logs don't currently record this.

This feature isn't enough to move me to Firefox (which I have tried before), and if the feature proves useful, I'm sure that the next major version of Internet Explorer will support it.  Anyone got an opinion about this?

4 Comments

  • Intersting....

    but I have to admit, I dont like the idea of prefetch for a search engine results. With in a domain, or application prefetch would be logical to me, possibly speeding up the users experience. But in a search...

    a) I am not always going to hit the top one or two .. especially in google latley because there results seem to be getting worse over time. Yahoo is getting better.

    b) I share my connection with others in my house... why do i need to uselessly download sites in the background that they or I might not be hitting?

    c) as you pointed out, it will leave traces on my computer that I am not even aware of ... cookies, js, temp files, etc...



  • Just a correction. Google does not advise rel=&quot;prefetch&quot; on all pages. They only do so on search terms where they find that a large % of the searches just access the first result.



    Also the prefetch advice itself does not mean Mozilla will actually prefetch that document. Mozilla has an internal algorithm to determine if prefetching should be performed.



    I believe they would have included this for IE, if IE had any form of prefetching implemented.



  • I agree to Sanketh!~

  • &quot;Also the prefetch advice itself does not mean Mozilla will actually prefetch that document. Mozilla has an internal algorithm to determine if prefetching should be performed.&quot;



    Interesting. I assume it won't actually transfer a page that it already has in it's cache - it's already prefetched. I'm curious under what other reasons it won't prefetch.



    &quot;I believe they would have included this for IE, if IE had any form of prefetching implemented.&quot;



    That is obvious. But if/when IE or any other browser implements prefetching, they won't get the benefit until Google changes it's software.



    Probably not a big deal, as Google can change quickly, but why if it's valid HTML that it not be included? A possible answer is overall performance.

Comments have been disabled for this content.