Suspiciously High Bounce Rates - A Tale of 'Top Sites'

Posted by Adrian Duke on 09 February 2012

A few days ago one of our clients, Andrew, informed us that he was getting extremely high bounce rates on one specific browser (Safari). He'd actually ended up doing most of the leg work in diagnosing the problem himself, by pointing out a blog post that referred to this issue - after reading through I was interested to find out if this problem still persisted and in what other browsers.

The Problem:

For those of you who haven't read the original article, I will give a brief summary of the issue:

  • User is using Safari (or Opera as we will find out)
  • User vists the site regularly enough for it to appear in their 'Top Sites' section
  • Every time user opens a new tab 'Top Sites' is displayed
  • In displaying the 'Top Sites' thumbnail, Safari makes a full request to the webpage, increasing bounce rate if using site analytics **

** The user has to hang around on the 'Top Sites' tab for a few seconds before the request is made.

This isn't limited to an increase in bounce rate either, as when the offending browsers are making full requests to web pages in the 'Top Sites' tab they request all assets and all javascript regardless... So if you are really concerned keep reading!

The Research:

I decided to use the method described in the original blog post, it was simple and I already had Charles installed. It was as easy as running Charles and watching the requests when loading the 'Top Sites' section.

The list that follows is of all the browsers I tested that have 'Top Sites', I decided to stick with mainly modern browsers as I didn't have the time to test all possible versions:

  • Safari 4+
  • Chrome 15+
  • Opera 10+
  • IE9

Safari 4+

Safari was easy enough to test, open a new tab and wait about 5 seconds until all the top sites start refreshing. I only tested 5.1 as the original blog post is on 4, I have a feeling they have added the time delay since. You will find that ONLY the get request to the page itself will have an added header.

X-Purpose = preview

This is currently the ONLY way to detect a request made by the 'Top Sites' section.

Chrome 15+

Chrome doesn't conform in the same way as the other browsers in that Google have obviously realised this is an issue and have such implemented a nice feature that avoids the problem altogether.

Chrome will generate a thumbnail image when you genuinely visit the website, so when in the 'Top Sites' section it makes a request to an internal url (chrome://thumb/[TOP SITE URL]) which is harmless. You can test this yourself by removing the 'Top Sites' file located in:

%LOCALAPPDATA%\Google\Chrome\User Data\Default\

Mac OS X:
~/library/application\ support/google/chrome/default/


Once removed, restart chrome and you should find your 'Top Sites' have no thumbnails. Visit one of the top sites and return back and you will see it now has a thumbnail :).

I don't believe this has always been the case, a few searches revealed that with a few previous versions it acted in the same way as Safari (being webkit and all) and would request the whole page using the same 'X-Purpose: preview' header. Well, at least it conformed in the same way to keep our fix consistent!

Opera 10+

Opera, like safari acted exactly the same way. Open a new tab, wait a few seconds and each top site thumbnail will start refreshing with the same header and making the same full request!


IE9 bypasses this all together by not displaying a thumbnail at all... Well, at least it's not causing any extra headaches like some other versions I know!


Firefox by default doesn't have a 'Top Sites' feature and so doesn't cause this problem... But whilst googling around, I did find references to a header that may crop up so I included it in my fix like any cautious dev would. The header relates to the prefetch feature many browsers now implement:

X-Moz = prefetch

Note 'prefetch' NOT 'prefetech' as a certain drupal post mentions and consequently many other places.

The Fix:

The idea is to catch the custom headers being sent and do something appropriate with them, you could either remove analytics tracking from your page when the headers are set, or take it one step further and have a custom page that will be displayed in the users 'Top Sites' section (think creatively). So here it is:

Apache .htaccess

SetEnvIf X-Moz prefetch GA-Ignore=true
SetEnvIf X-Purpose preview GA-Ignore=true

This will set another header called 'GA-Ignore' to true if its a request from mozilla prefetch or 'Top Sites'. 


// Check request headers for our flag
if( isset($_SERVER['GA-Ignore']) && $_SERVER['GA-Ignore']) ){
    // Don't load analytics here

You could also load a different page (via rewrites) if it is a 'Top Sites' / prefetch request.

RewriteCond %{ENV:GA-Ignore} true
RewriteRule .* /top-sites.html [L,R=301] 

We will be releasing our new SEOPack module for Magento later this week which will include a fix for this problem along with other SEO based enhancements.

A big thank you to Andrew for rasing this issue.


No one has commented on this page yet.

Post your comment