Over a million developers have joined DZone.

Are Google Analytics Cookies Slowing Down the Internet?

DZone's Guide to

Are Google Analytics Cookies Slowing Down the Internet?

· Performance Zone ·
Free Resource

Sensu is an open source monitoring event pipeline. Try it today.

Eduardo Cereto has some concerns about the possibility of Google Analytics cookies slowing down the sites that use the web app (which obviously includes many of the most popular sites on the internet).  Some readers may have thought this claim illegitimate, as such a major issue could hardly have gone unnoticed by Google engineers.  But the first comment on Cereto's post was made by none other than Rasmus Lerdorf, the creator of PHP, who knows a thing or two about web performance.

According to Cereto, a 5% average performance boost could be gained by the sites that use GA if Google were to modify the handling of the web app's cookies.  Cereto claims that

GA Cookies represent about 25% of that HTTP request size. The moment you notice GA is present in about 50% of top websites you notice that useless GA cookies going around the internet represent 12% of all HTTP requests.  -- Eduardo Cereto

Over 14.5 million websites use Google Analytics.
Cereto's statistics must have come from the Google SPDY whitepaper he cites in his blog entry, and he has since posted a bug on GA-Issues, which has not gotten any attention from Google.  His post suggests that this issue could be fixed by using localStorage features in HTML5, although this would of course only help people that are using a browser with support for this feature.  Still, the outlook here is not so bad, as Cereto points out:  Only HTTP requests, instead of responses, are really affected by these cookies.  Rasmus Lerdorf also checked the issue with the following point:

I kind of doubt the 5% number for the typical request. But requests that already carry a bunch of cookies and other header data where the GA cookie makes the request headers overflow the MTU will definitely see improvement by being cut to fit in a single packet. Especially for mobile devices on slower connections.  -- Rasmus Lerdorf

The question now is whether Google has truly ignored this potential problem, or is Cereto missing an important aspect of web performance?

Sensu: workflow automation for monitoring. Learn more—download the whitepaper.


Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}