If you are using Google Analytics and on a quest to reach 100/100 on PageSpeed Insights you may need to Consider Fixing: Leverage browser caching for the following cacheable resources:
http://www.google-analytics.com/analytics.js (2 hours)
How do you leverage browser cache for Google Analytics?
The short answer is to host it on your own server and download the latest script from Google daily. This way you get the javascript file as well as cache it.
Or simply point your Google Analytics script to our cached file:
http://www.schedule-analytics.com/analytics.js
This file is updated regularly to the source follow the idea on this article:
http://diywpblog.com/leverage-browser-cache-optimize-google-analytics/
Check our Project Wiki page for more detail:
https://sourceforge.net/p/schedule-analytics/wiki/
Since Google doesn't do anything to solve this issue. So we dedicated this project as an alternative solution on serving the file for whoever need it.
Features
- Dedicated to Reach Score 100/100 on Google PageSpeed Insights
- Fixing: Leverage Browser Caching & Enable Compression
- Cached and updated regularly to the Google Analytics source
- Use 'application/javascript' content-type (text/javascript is obsolete)
- Available for both type of scripts: analytics.js and ga.js
- Files are served online as project content.
- Statistic of Uptime Service are available.