Support » Plugin: LiteSpeed Cache » EU Cookie Law and LiteSpeed Cache Problem

  • Resolved Mellco

    (@mellco)


    Hello,

    I am using a plugin EU Cookie Law. When the user accepts cookies it is not being recorded and the cookie banner remains.

    When I disable LiteSpeed Cache the plugin functions properly. Obviously the cookies are being cached and not being refreshed when a user changes his cookie preference.

    I am not sure this .htaccess rule will help:
    RewriteRule .* – [E=cache-vary:cookie_name]

    Thoughts?

    Cheers!

    • This topic was modified 3 years, 6 months ago by Mellco.
    • This topic was modified 3 years, 6 months ago by Mellco.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Could you please try exclude that cookie in “Exclude” tab?

    Best regards,

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    My mistake , don’t use exclude, use:

    RewriteRule .* – [E=cache-vary:cookie_name] ought do it

    Best regards,

    Thread Starter Mellco

    (@mellco)

    Hello,
    Please tell me best way to determine cookie_name
    Cheers!

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    You can check the cookie name in Chrome ,

    in URL bar , click “secure” the greed lock pad , you can see “cookie” , from there you will see

    If I remember correctly , it should be euCookie ?
    Best regards,

    Thread Starter Mellco

    (@mellco)

    Hi,
    This crashes the site
    RewriteRule .* – [E=cache-vary:euCookie]

    I placed it here:
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* – [E=Cache-Control:no-autoflush]
    RewriteRule ^min/\w+\.(css|js) – [E=cache-control:no-vary]
    RewriteRule .* – [E=cache-vary:euCookie]

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Try replace

    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]

    with

    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    RewriteRule .* - [E=Cache-Vary:euCookie]

    Let me know how it goes.

    Best regards,

    Thread Starter Mellco

    (@mellco)

    Yes it was the capital “V”
    It works now thank you.

    Best Regards,
    Me

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘EU Cookie Law and LiteSpeed Cache Problem’ is closed to new replies.