我尝试了几种方法来获取图像和其他资源以获得过期日期,但似乎没有一种方法可以用于http://www.webpagetest.org/
我还安装了W3插件,仍然是工具报告图像没有过期标头设置.
我还在我的htaccess中包含了以下代码:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A300
ExpiresByType application/x-javascript A3600
ExpiresByType text/css A3600
ExpiresByType image/gif A3600
ExpiresByType image/png A3600
ExpiresByType image/jpeg A3600
ExpiresByType text/plain A300
ExpiresByType application/x-shockwave-flash A3600
ExpiresByType video/x-flv A3600
ExpiresByType application/pdf A3600
ExpiresByType text/html A300
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Run Code Online (Sandbox Code Playgroud)
这似乎是一个常见的问题,我已经看到很多关于此的问题,但找不到答案.
是测试工具还是我的服务器上的问题?我该怎么知道?
小智 5
我遇到了同样的问题.似乎(某些)验证器,如YSlow,在到期日期值之前不会成功31536000.
这是一个完整的W3 Total Cache htaccess:http://pastebin.com/wegK3jD6.
它对我有用,你不妨试一试.
请注意,pastebin不包含WordPress htaccess内容
| 归档时间: |
|
| 查看次数: |
9667 次 |
| 最近记录: |