WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
Expiry Headers on a cdn.domain.com (9 posts)

  1. djmorrisinc
    Member
    Posted 4 years ago #

    Checking my site in Yslow, it says that I need expired headers on both my css & js for http://cdn.jupiterflhomes.com/wp-content/w3tc/ . Is there a way to do this in either .taccess or W3TC?

    There are 2 static components without a far-future expiration date.

    * http://cdn.jupiterflhomes.com/wp-content/w3tc/min/b9130f/index.include.1912919031.css
    * http://cdn.jupiterflhomes.com/wp-content/w3tc/min/b9130f/default.include.1633337174.js

  2. leadfigures
    Member
    Posted 4 years ago #

    This is mostly an aspect of your CDN, and you need to speak to them about how to achieve this.

    However if W3 total cache supports uploading to the CDN as it does for instance with Amazon S3 storage, it should set the appropriate headers as it uploads. Currently W3 total cache does not do this, which is a shame as it is a simple matter of adding the appropriate HTTP headers when the file is uploaded (say when total cache is configured to set expiry headers on cache objects). At the moment I have to manually recurse my CDN files and manually set the additional headers, and this costs money!

  3. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    @djmorrisinc I'm not sure what options you have enabled so I have to guess. But you have cache-control, etags and pragma set. You're only missing expires.

    @leadfigures you are completely mistaken. Check the changelog to discover when this was added and check browser cache settings to make sure that W3TC is setting headers for your site.

  4. leadfigures
    Member
    Posted 4 years ago #

    Changelog says:

    Added CDN support for Amazon S3 and CloudFront
    Added check of file hash before uploading to Amazon S3

    Can't see any mention of expires headers or any other headers supported when uploading to CDN.

    Have forcibly uploaded my media files to Amazon S3 (again), No HTTP headers are added to the files "attributes".

  5. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    It was added in v0.9.0. Anyway, if you have found a bug please sent a bug submission form from the support tab of the plugin.

  6. leadfigures
    Member
    Posted 4 years ago #

    Cheers Frederick, that explains it as I was using 0.8.x at the time I made that comment, I have just upgraded and everything appears to work just fine now.

    Keep up the good work!

  7. Frederick Townes
    Member
    Plugin Author

    Posted 4 years ago #

    Cool.

  8. Hayden James
    Member
    Posted 3 years ago #

    lol ohhh the tension.

    cache-control headers are not being set on our images uploaded to s3.

    But this seems like a touchy subject so will just wait.

  9. Frederick Townes
    Member
    Plugin Author

    Posted 3 years ago #

    Touchy? In the latest release the browser cache settings you have selected determine what headers are set for S3. Also S3 is not a CDN, cloudfront is.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic