我正在使用php laravel框架。 我试图解决利用浏览器缓存。但它仍然显示
在我的.htaccess
中<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 5 minutes"
ExpiresByType image/jpeg "access 5 minutes"
ExpiresByType image/gif "access 5 minutes"
ExpiresByType image/png "access 5 minutes"
ExpiresByType text/css "access 2 minutes"
ExpiresByType text/html "access 2 minutes"
ExpiresByType application/pdf "access 2 minutes"
ExpiresByType text/x-javascript "access 2 minutes"
ExpiresByType application/x-shockwave-flash "access 2 minutes"
ExpiresByType image/x-icon "access 5 minutes"
ExpiresDefault "access 2 minutes"
</IfModule>
<IfModule mod_headers.c>
<filesmatch "\.(ico|flv|jpg|jpeg|png|gif|css|swf)$">
Header set Cache-Control "max-age=60, public"
</filesmatch>
<filesmatch "\.(html|htm)$">
Header set Cache-Control "max-age=60, private, must-revalidate"
</filesmatch>
<filesmatch "\.(pdf)$">
Header set Cache-Control "max-age=60, public"
</filesmatch>
<filesmatch "\.(js)$">
Header set Cache-Control "max-age=90, private"
</filesmatch>
</IfModule>
在我的apache中 mod_rewrite &amp; mod_headers 已启用
我已将缓存时间设置为1周。不到一周不能正常工作。
我该如何解决?