• Found in your documentation https://www.wpfastestcache.com/optimization/leverage-browser-caching/ (and in the response headers in my browsers’ dev tools):

    Expires: max-age=2592000, public

    as set in the .htacces at

    <IfModule mod_headers.c>
    Header set Expires “max-age=2592000, public”

    This “Expires”-value is invalid, see RFC 2616 section 14.21:
    https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.21
    The format is an absolute date and time as defined by HTTP-date in section 3.3.1; it MUST be in RFC 1123 date format. [..] HTTP/1.1 clients and caches MUST treat other invalid date formats, especially including the value “0”, as in the past (i.e., “already expired”).
    or https://developer.mozilla.org/en/docs/Web/HTTP/Headers/Expires

    An interpretation as a date in the past doesn’t seem to be what you might want to express with that max-age value.
    Could you please explain this value (if it’s indended) or improve it (if not)?

    And a related question:
    If setting “[x] Browser Caching” is on, is it also active for entries in the “Exclude”-tab?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Emre Vona

    (@emrevona)

    <IfModule mod_headers.c>
    Header set Expires “max-age=2592000, public”

    I forgot to change the tutorial. wp fastest cache does not add such rule. wp fastest cache adds such rules below.

    “Header set Expires \”Mon, 29 Oct 1923 20:30:00 GMT\””.”\n”.
    ‘Header set Expires “max-age=A10368000, public”‘.”\n”.

    Thread Starter cyrfer

    (@cyrfer)

    Expires “max-age=A10368000, public” is also no RFC 1123 date format and therefore an invalid value for the Expires header.

    max-age is an option for header Cache-Control only, but not for Expires, see https://tools.ietf.org/html/rfc7234#section-5.2 and 5.3.

    So asking again, why that invalid value?
    (“why not”, “for the lulz”, “to confuse possible copy-cats” are acceptable answers, since any invalid value MUST be interpreted by the browser as “in the past”…)

    Plugin Author Emre Vona

    (@emrevona)

    You can disable browser caching option and add by yourself.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Expires header not RFC conform’ is closed to new replies.