【发布时间】:2015-11-11 19:06:52
【问题描述】:
我收到此错误:
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)
这是我的谷歌分析 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,这是唯一的一个。你能帮我解决这个问题吗?
【问题讨论】:
标签: .htaccess caching google-analytics