Leverage browser caching – expiration not specified
-
Hello,
I have a website on wpengine with this plugin installed. Now I have a problem with caching some images. Here is the response headers for one problematic image:
accept-ranges: bytes
content-length: 99
content-type: image/png
date: Fri, 29 Mar 2019 08:22:24 GMT
etag: “5c094d80-63”
last-modified: Thu, 06 Dec 2018 16:25:36 GMT
server: NetDNA-cache/2.2
status: 200
vary: Accept
x-cache: HITAs you can see expiration header not specified. I have enabled this plugin, also I added this in htaccess but again nothing:
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg “access plus 1 month”
ExpiresByType image/jpeg “access plus 1 month”
ExpiresByType image/gif “access plus 1 month”
ExpiresByType image/png “access plus 1 month”
ExpiresByType text/css “access plus 1 month”
ExpiresByType application/pdf “access plus 1 month”
ExpiresByType text/x-javascript “access plus 1 month”
ExpiresByType application/x-shockwave-flash “access plus 1 month”
ExpiresByType image/x-icon “access plus 1 year”
ExpiresDefault “access plus 2 days”
</IfModule># One year for image files
<filesMatch “.(jpg|jpeg|png|gif|ico)$”>
Header set Cache-Control “public”
</filesMatch>
# One month for css and js
<filesMatch “.(css|js)$”>
Header set Cache-Control “public”
</filesMatch>I’m also using CDN for these images, could that be connected? Should I do something else to set expiration headers?
- The topic ‘Leverage browser caching – expiration not specified’ is closed to new replies.