• Resolved tagah

    (@tagah)


    Hello 🙂

    In order to be compliant with the European Data Protection Regulation (RGPD), I need scripts (like Google’s or Bravo’s) not to load based on the value of the cookie named “cookie-viewed-policy”. If the cookie is set to no or is not set, then the javascript codes are not called (this check is done in php).

    Reading Cédric Charles’ post, I understand that LSCache needs to be told to save several caches per page depending on the cookie value. This is done by adding this line to the .htaccess file

    RewriteRule .* - [E=Cache-Vary:%{ENV:LSCACHE_VARY_VALUE}+euCookie]

    So I added this mention in my htaccess by modifying “euCookie” by “cookie-viewed-policy” which gives :

    RewriteRule .* - [E=Cache-Vary:%{ENV:LSCACHE_VARY_VALUE}+cookie-viewed-policy]

    Other posts on this forum indicate that you should add this at the very beginning of the htacess file, so that’s what I did. But, even after testing several other positions in the file, it doesn’t work at all. The scripts are loaded according to what is cached, not according to the cookie (I should point out that I purge the cache from the plugin interface each time I try).

    Many thanks for your help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tagah

    (@tagah)

    EDIT : If it helps, here’s the report number:GTWNWMNG

    Plugin Support qtwrk

    (@qtwrk)

    your hosting provider is using LiteSpeed ADC, the rule needs to be sync’ed into the ADC setting , only add to htaccess is not enough

    Thread Starter tagah

    (@tagah)

    Unfortunately, my host doesn’t seem to want to help me resolve this problem. He told me that: “Unfortunately and at present, this type of option cannot be modified on the server side.”

    So there are no other solutions?

    Thank you very much for your help in any case!

    Plugin Support qtwrk

    (@qtwrk)

    sadly , in such case , there is no other way…

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

The topic ‘Cookie consent and multiple cache for one pages (vary)’ is closed to new replies.