• Hi,

    I am using Amazons CDN cloudfront and it appears that for some reason they remove the expiry tags from everything. No matter what I set in the Browser cache settings no expiry shows up in any page speed test. I checked the htaccess file

    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType text/css A216000
        ExpiresByType text/x-component A216000
        ExpiresByType application/x-javascript A216000
        ExpiresByType application/javascript A216000
        ...
        ExpiresByType image/png A2592000
        ...
        ExpiresByType image/jpeg A2592000
        ...

    and all the expiry tags are set but nothing shows up.

    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/plugins/juiz-last-tweet-widget/img/sprite.png (expiration not specified)
    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/plugins/juiz-last-tweet-widget/img/twitter.png (expiration not specified)
    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/plugins/sem-external-links/external.png (expiration not specified)
    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/uploads/2013/01/SPS0603_960x300c.jpg (expiration not specified)
    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/uploads/2013/02/SPS0639_960x300.jpg (expiration not specified)
    https://d2vfw7m9iekhp4.cloudfront.net/wp-content/uploads/2013/03/SPS0610_960x300c.jpg (expiration not specified)

    Any ideas???

    Thanks

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m having the same issue. Site is https://www.arresteddevops.com. All of the stuff coming from the CDN (CloudFront with S3 orgin, set up in W3TC) has no expiration set for the client, even though it is set within the plugin.

    For example, here are the headers coming from origin:

    * Connection = keep-alive
    * Vary = User-Agent
    * Pragma = public
    * CF-Cache-Status = HIT
    * CF-RAY = 10f7a9b832930755-AMS
    * Accept-Ranges = bytes
    * Content-Length = 43924
    * Cache-Control = public, max-age=31536000
    * Content-Type = image/jpeg
    * Date = Sun, 23 Mar 2014 03:50:07 GMT
    * Expires = Mon, 23 Mar 2015 03:50:07 GMT
    * ETag = "ab94-4f5241b06d1bc"
    * Last-Modified = Fri, 21 Mar 2014 20:55:27 GMT
    * Set-Cookie = __cfduid=d8b6a37ac1e911d72154b389cfc5582471395546607392; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.arresteddevops.com; HttpOnly
    * Server = cloudflare-nginx
    * X-Powered-By = W3 Total Cache/0.9.3

    and here are the headers coming from the same image in cloudfront

    * Connection = keep-alive
    * Age = 34
    * X-Cache = Hit from cloudfront
    * X-Amz-Cf-Id = rjDTYHTSfWYJaEHnFU_MKb-n3KiOkbb2iIut7s8CjMnAhbh2URA8tg==
    * Accept-Ranges = bytes
    * Content-Length = 43924
    * Cache-Control = public
    * Content-Type = image/jpeg
    * Date = Sun, 23 Mar 2014 03:48:32 GMT
    * Expires = Mon, 23 Mar 2015 03:42:07 GMT
    * ETag = "d14f107a21808776af7eecb757463c9a"
    * Last-Modified = Sun, 23 Mar 2014 03:42:07 GMT
    * Server = AmazonS3
    * Via = 1.1 2feaae5abe3e9545d63b67a1381aec70.cloudfront.net (CloudFront)

    Thread Starter chucknb28409

    (@chucknb28409)

    Hi Matt,

    Can I ask how you got the header detail you have, I would like to look at mine as well?

    Thanks

    Thread Starter chucknb28409

    (@chucknb28409)

    Hi,

    Okay I have look into this more deeply and it looks like Amazon is returning expiry tag as long as the content is marked to be handled by the CDN. That’s where the problem comes in, I had to remove the ‘Host theme files’ from the CDN in order to prevent imported fonts from being uploaded to the CDN. Firefox and Safari will not load externally hosted fonts so I excluded them from the CDN, but there must be a bug since they are not being marked by the server with expiry tags.

    Matt, check your settings and see what you are uploading to the CDN I will bet the stuff not uploading is missing the expiry tags or at least some of it if the content is included on the exclude list under the CDN settings page.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Amazon CDN Cloudfront removes expiry tags is there a fix?’ is closed to new replies.