Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add Google Analytics on solving far future caching issue, and rapidly update it (under the same URL) #1670

laukstein opened this Issue · 4 comments

3 participants


Google Universal Analytics
Old Google Analytics


There are multiple articles about speeding up Google Analytics by serving it locally with far future caching and on using cron job to keep it updated. And Google more likely would not do anything to solve that issue.

The current browser caching is 12 hours. It is not enough to speak about performance.


This is tricky from a maintenance point of view, too. There's no obvious versioning in the .js file, and there's nothing to stop Google tweaking the file as often as they like; they don't suggest/recommend locally-hosted copies, as far as I know, so there's no onus to keep the users updated on what's going on.

That said, I'd be happy to be involved with an experiment to see how, if at all, it affects load times and data collection.


I've given this some more thought, and it's going to be very tricky from a maintenance point of view with the lack of versioning involved. With that in mind, I'm going to close this issue for now, @laukstein - if things change and there is scope for a cdnjs hosted GA file, I'll reopen for reference.

@petecooper petecooper closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.