我收到此错误:
Leverage browser caching
Setting an expiry date or a maximum age in the HTTP headers for static resources instructs the browser to load previously downloaded resources from local disk rather than over the network.
Leverage browser caching for the following cacheable resources:
http://www.google-analytics.com/analytics.js (2 hours)
这是我的google analytics js代码:
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-35812981-4', 'auto');
ga('send', 'pageview');
</script>
在stackoverflow上关于此消息的问题很少,他们的答案对我不起作用。我怎么能摆脱这个消息?我的分数是99/100,这是唯一的一个。你能帮帮我吗?
答案 0 :(得分:0)
可能的解决方案是使用this service。它提供了具有更长时间的analytics.js的缓存副本。您只需将分析链接更改为此链接:http://www.schedule-analytics.com/analytics.js