Expires headers not working on S3
-
I finally got around to setting up a CDN with W3TC, using Amazon S3. So far, everything seems to be working. (The site is here.) The images are being served from the CDN.
However, when I checked with PageSpeed and Yslow, it still warned me that I needed to set Expires headers for that content, even though I have browser cache enabled in W3TC.
Here’s where it gets weird. When I look at the images on S3, I can see metadata created by W3TC that sets the appropriate header. For example, for this image, the metadata tab on S3 says “Key: Expires” with a value of “Fri, 04 Jan 2013 16:30:53 GMT”
But when I look at the image in PageSpeed, it shows only an ETag and no Expires header at all.
HOWEVER! If I make any change whatsoever to the metadata field on S3, like simply clicking in the field and then clicking “Save”, it appears to write the header properly. Take a look at this image in Page Speed for comparison. The only thing I did was click in the metadata field, then click save.
So, what do I do? I have way too many images to go through and click each one of them. And I’d like new ones to have an Expires Header set automatically. Any idea why the initial upload to the CDN is setting the metadata value, but that value is not showing up as the appropriate header?
- The topic ‘Expires headers not working on S3’ is closed to new replies.