1
我已经添加下面的FilesMatch分支,我的htaccess里面,但谷歌仍的PageSpeed抱怨设置缓存到期。这段代码是否有效?设置缓存过期的静态资源
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css)$">
ExpiresActive On
ExpiresDefault A2592000
</FilesMatch>
# END WordPress
感谢丹尼尔。在HTML5中,不需要在脚本标签中指定类型属性(例如,type =“text/javascript”)。 ExpiresByType text/javascript仍然捕获它吗? – 2012-04-09 22:08:39
@ScottB我忘了这件事。我仍然在我的