我在.htaccess中使用以下代码进行浏览器缓存:
# turns cache on for 1 month
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/css "access plus 1 month"
ExpiresByType text/javascript "access plus 1 month"
ExpiresByType text/html "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 month"
</IfModule>
<ifmodule mod_headers.c>
<filesmatch "\\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "max-age=2592000, public"
</filesmatch>
<filesmatch "\\.(css)$">
Header set Cache-Control "max-age=604800, public"
</filesmatch>
<filesmatch "\\.(js)$">
Header set Cache-Control "max-age=216000, private"
</filesmatch>
</ifmodule>
但是当我运行谷歌页面速度工具时,有几个.js文件没有包含在浏览器缓存中:
http://www.hwi-sicherheit.de/…jquery.form.min.js?ver=3.51.0-2014.06.20 (2,5 Tage)
http://www.hwi-sicherheit.de/…-form-7/includes/js/scripts.js?ver=4.3.1 (2,5 Tage)
http://www.hwi-sicherheit.de/…-wordpress/js/mappress.min.js?ver=2.43.4 (2,5 Tage)
http://www.hwi-sicherheit.de/…-shortcodes/includes/js/rsvp.js?ver=1.82 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/jquery/jquery-migrate.min.js?ver=1.2.1 (2,5 Tage)
http://www.hwi-sicherheit.de/…-includes/js/jquery/jquery.js?ver=1.11.3 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/jquery/jquery.masonry.min.js?ver=3.1.2 (2,5 Tage)
http://www.hwi-sicherheit.de/…/wp-includes/js/masonry.min.js?ver=3.1.2 (2,5 Tage)
http://www.hwi-sicherheit.de/…s/wp-includes/js/wp-embed.min.js?ver=4.4 (2,5 Tage)
为什么这些文件不包含在浏览器缓存中?有谁有想法解决这个问题??