• Resolved asafm7

    (@asafm7)


    Hello.

    Is it possible to vary on a specifc cookie existence (and not cookie value).

    That means having 2 cached versions: one for when the specific cookie isn’t set and a second for when the cookie is set (regardless of its value).

    Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support qtwrk

    (@qtwrk)

    RewriteCond %{HTTP_COOKIE} !some_cookie_name
    RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+special_cookie_vary]

    please try this , add it at top of your .htaccess

    Thread Starter asafm7

    (@asafm7)

    Thanks @qtwrk!

    I assume some_cookie_name should be replaced with the relevant cookie name.

    What should special_cookie_vary be replaced with?

    Thanks again!

    Plugin Support qtwrk

    (@qtwrk)

    some_cookie_name to your specific cookie

    special_cookie_vary , you can put anything you want , it’s merely like a note name , it doesn’t matter

    Thread Starter asafm7

    (@asafm7)

    That’s what I assumed. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Vary on cookie existence (and not cookie value)’ is closed to new replies.