我在htaccess文件中包含了以下部分。但是,当我运行Google PageSpeed Insights时,我仍然会收到3个js文件的错误。原因可能很明显,但我看不出来。 唐纳德
# BEGIN Expire headers
ExpiresActive On
ExpiresDefault "access plus 1 week"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
**ExpiresByType text/javascript "access plus 604800 seconds"**
ExpiresByType application/x-javascript "access plus 604800 seconds"
ExpiresByType text/html "access plus 604800 seconds"
ExpiresByType application/xhtml+xml "access plus 1200 seconds"
# END Expire headers
利用浏览器缓存以获取以下可缓存资源:
https://apis.google.com/js/plusone.js?onload=onLoadCallback (30 minutes)
http://google-analytics.com/ga.js (2 hours)
http://www.google-analytics.com/analytics.js (2 hours)
htaccess文件中的特定文件路径是否可能受到责备?即在一行中我有text / javascript,在另一行我有application / x-javascript。我需要加倍吗?