Last Updated on October 15, 2007 EDT by
Over at the Ask Apache site there is an article about Google Analytics and how to speed up your page load. You can read it here: Speed Up Google Analytics with Urchin.js
Ever notice that sometimes your sites take a while to load all the way because google’s urchin.js file is taking forever?
You may recognize this problem when you see something similar to this in your browsers status bar “Transferring data from google-analytics.com…”
Time To Setup?4 minutes I got tired of seeing that all the time and so I set up an automated cronjob that runs every 12 hours and downloads the latest version from google, and saves it to my website directory, then I reference /urchin.js instead of http://www.google-analytics.com/urchin.js.. and my site loads a lot faster!
Take a look at the source for this page if you want to see what is going on (look at the bottom)
There are 2 pretty major things that you accomplish by hosting urchin.js locally1. You Enable persistant connections
2. You ensure that the correct 304 Not Modified header is sent back to your site visitors instead of reserving the entire file.