• Summary:
    ======================

    For Page cache (page_enhanced); “Vary: Accept-Encoding, Cookie” is never sent for the first time (cache creation).

    Only “Vary: Accept-Encoding” is sent when there is no file cache; afterwards “Vary: Accept-Encoding, Cookie” is sent correctly when reply comes from the cache.

    (w3tc 0.9.4)

    Reproduction steps:
    ======================

    1) Activate w3tc page cache with page_enhanced mode.

    2) log out wordpress

    3) Clear you browser’s cache.

    4) request a page http://your-site.com/

    5) There is a problem here. You will not see “Vary: Accept-Encoding, Cookie”. Only “Vary: Accept-Encoding” is sent.

    This is the first time file cache is created and wordpress will read the cache out.

    6) Refrest (F5) to request the same page again http://your-site.com/

    7) Now, you will see “Vary: Accept-Encoding, Cookie”.

    This is your server directly responding from cache, not wordpress. There is no problem here.

    For the first time a page’s cache created, wordpress reads out the cached file. WordPress just returns “Vary: Accept-Encoding”.

    It must return “Vary: Accept-Encoding, Cookie”

    Waiting for the developer to fix it.

    To view http headers while reproducing the bug, you can use “Live HTTP Headers” Firefox plugin.
    https://addons.mozilla.org/en-us/firefox/addon/live-http-headers/

    BTW, this bug is not server dependent IMHO, please read my previous bug fix (about nginx page cache) if you will use nginx while reproducing the bug.

    Thanks

    https://wordpress.org/plugins/w3-total-cache/

  • The topic ‘BUG: "Vary: Cookie" is not sent for the first time’ is closed to new replies.