缓存过期不适用于Wordpress中的某些图像

我为我的Wordpress定义了缓存过期,但SpeedTest仍然告诉我应该为某些jpg和png图像修复它。

我安装了Cache Enabler插件,并将以下内容添加到我的.htaccess中:

<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresDefault "access plus 1 seconds"
  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 216000 seconds"
  ExpiresByType application/x-javascript "access plus 216000 seconds"
  ExpiresByType text/html "access plus 600 seconds"
  ExpiresByType application/xhtml+xml "access plus 600 seconds"
</IfModule>

<IfModule mod_headers.c>
 <filesMatch ".(ico|pdf|flv|jpg|svg|jpeg|png|gif|js|css|swf)$">
 Header set Cache-Control "max-age=84600, public"
 </filesMatch>
<FilesMatch ".(css)$">
Header set Cache-Control "max-age=2692000, public"
</FilesMatch>
<FilesMatch ".(js)$">
Header set Cache-Control "max-age=216000, private"
</FilesMatch>
<FilesMatch ".(x?html?|php)$">
Header set Cache-Control "max-age=600, private, must-revalidate"
</FilesMatch>

Header unset ETag
Header unset Last-Modified

</IfModule>

我也试图遵循这些指示,但仍然没有运气。

为什么这些图像没有定义缓存过期有没有特别的原因?

顺便说一句,所有图像都在我的服务器上,其中大部分都在文件夹中:

的wp-content /上传/缓存/

可湿性粉剂内容/主题/ WordPress的/图像/

链接地址: http://www.djcxy.com/p/61213.html

上一篇: Cache expires not applying to some images in Wordpress

下一篇: Wordpress backend caching bug?