Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Could you please share your URL so we can check from our end?
I’ll also check with the dev team to see if the issue was added in our updates
Looking forward to helping you. Thank you.
Hello,
Since these are external files and there is nothing you can do to cache these you may have to currently ignore this test on your site. Please note that these test are only for your own reference. If some, such in this case, don’t seem to apply to your site, you can safely ignore them.
Hope this helps you. Thank you.
Hello,
I just checked your site and I can see that the images in fact don’t have the expires
header. For example take a look at this image file:
https://mlpzhisx54aq.i.optimole.com/5B06ESk.-np2~5cd83/w:auto/h:auto/q:auto/https://www.acorusenvironmental.com/wp-content/uploads/2020/09/acorus-environmental-logo.png
It comes with the following HTTP headers:
accept-ranges: bytes
age: 221
cache-control: immutable,max-age=31536000
content-length: 5130
content-type: image/webp
date: Sun, 25 Oct 2020 10:18:14 GMT
etag: "c52ee9bee566def9775e54a587f8a0ad"
last-modified: Sun, 18 Oct 2020 11:38:40 GMT
server: AmazonS3
status: 200
via: 1.1 f78fee2989d34e40cb45ddfbcb9ba346.cloudfront.net (CloudFront)
x-amz-cf-id: vmGWEAXKU0Q5lMGDZ6ZuOEutQotnqhstxXYax-JYDUVrL6UvTKHMdw==
x-amz-cf-pop: VIE50-C1
x-amz-meta-etag: 0ea58a157172a0a053d9c3102186bbdd9c758b0280b4323a7c8db3505941cb4f
x-amz-meta-ex-size: 17172
x-amz-meta-link: https://www.acorusenvironmental.com/wp-content/uploads/2020/09/acorus-environmental-logo.png
x-amz-replication-status: REPLICA
x-amz-version-id: YdyV_T83QyENa.C9f58dZUgICyTeY7SR
x-cache: Hit from cloudfront
As you can see, expires
is not in the list. You can verify the same in the browser’s Developer Tools.
Hope that helps.
Hi Balazs,
Surely the expires header for images is taken care of in the .htaccess file where this code appears…
# BEGIN W3TC Browser Cache
<IfModule mod_mime.c>
AddType image/jpeg .jpg .jpeg .jpe
AddType image/png .png
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg A31536000
ExpiresByType image/png A31536000
</IfModule>
or am I missing something?
Many thanks
Hi,
The images are loaded from an external CDN, so your local .htaccess file doesn’t apply for them.
And, as my colleague mentioned, these are recommendations and not strict rules. Although expires
is usually recommended for static resources like images, your CDN apparently uses the cache-control
header instead, which should work the same way. So, you have nothing to worry about, browser caching is indeed enabled for your images.
We may add cache-control
support to our SEO Analysis checker bot in the future, so that it will accept that instead of expires
.
Hope that helps. If you have any question, please feel free to ask.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.