WordPress.org

Ready to get started?Download WordPress

Forums

CDN Sync Tool
The Expires header's value isn't a valid date. (6 posts)

  1. hydn
    Member
    Posted 3 years ago #

    HTTP dates have very specific syntax, and sending an invalid date can cause a number of problems, especially around caching. Common problems include sending "1 May" instead of "01 May" (the month is a fixed-width field), and sending a date in a timezone other than GMT. See the HTTP specification for more information.

    Please fix the date issue for dates less than 10.

    Example "1 May" instead of "01 May"

  2. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    Good spot, fixed in the development verison.

  3. hydn
    Member
    Posted 3 years ago #

    Thanks! Where can I download that version? or how can I apply fix?

    Also, I would like to change the cache control : max-age 86400 to Cache-Control : max-age=31536000 .

    Where can this be done? All my existing images on Cloudfront are set to max-age=31536000 and I don't want to reduce to 1 day as per firebug and pagespeed recommendations for static files, esp our images that are never edited.

  4. Backie
    Member
    Plugin Contributor

    Posted 3 years ago #

    It can be downloaded at http://downloads.wordpress.org/plugin/cdn-sync-tool.zip

    I've fixed the lifespan on cache control as well. So you may want to give it 15 minutes or so before downloading it.

  5. hydn
    Member
    Posted 3 years ago #

    Thanks for the fast support! I will be sure to be thorough in any future issues/bug reports.

  6. hydn
    Member
    Posted 3 years ago #

    Uploaded. But its now set to 10 years!

    Via http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
    "To mark a response as "never expires," an origin server sends an Expires date approximately one year from the time the response is sent. HTTP/1.1 servers SHOULD NOT send Expires dates more than one year in the future."

    Also see:
    http://stackoverflow.com/questions/3284341/for-cache-control-to-expire-in-10-years-is-using-doc-cssv-128-exactly-the-same

    For example:
    Our existing cloudfront headers only use "Last Modified:" date and cache-control: max-age = 31536000

    That way it is ALWAYS set to 1 year from the last modified date or last accessed date and thus no need to set a 10 year expire date.

    Our existing http://redbot.org/ caching results :

    Cache-Control: max-age=31536000,
    Last-Modified: Thu, 12 May 2011 17:40:01 GMT

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic