• Resolved sc4rface97

    (@sc4rface97)


    I have a problem: I am setting the Vary cookie to my_cookie because one of the elements in my template should be displayed (or not) depending on whether this cookie exists. Unfortunately, setting this either directly in .htaccess or in the designated field under Litespeed Cache > Advanced > Vary Cookies does not work. Once the page is cached, it does not refresh when the value of the my_cookie cookie changes, meaning it remains stored in the cache until manually refreshed.

    Do I need to configure something additional on the server, or am I doing something wrong? I have reviewed all the documentation and various guides, and no one seems to have encountered this issue before, so I assume it might be related to my environment configuration.

    Details available in report ID: YJZVIMOH

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support litetim

    (@litetim)

    Hmmm
    That should work. I will create a test site and test the functionality there.

    Be back with updates

    Plugin Support litetim

    (@litetim)

    Let’s test a possible fix, in .htaccess replace:

    ### marker LOGIN COOKIE start ###
    RewriteRule .? - [E="Cache-Vary:cc_cookies_agreed,,wp-postpass_b5bc918f4d4ceca721f70164370b69c1"]
    ### marker LOGIN COOKIE end ###

    with:

    ### marker LOGIN COOKIE start ###
    RewriteRule .? - [E="Cache-Vary:cc_cookies_agreed,wp-postpass_b5bc918f4d4ceca721f70164370b69c1"]
    ### marker LOGIN COOKIE end ###

    Notice the double , missing in second code.
    Then try to see if the page generate correctly. Please review .htaccess not to have it regenerated.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Vary Cookies not working’ is closed to new replies.