Wordpress LScache Plugin: Cookie Notice for GDPR & CCPA
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello there Frist of all, thank you for your plugin. I need to install LiteSPeed on a new website that uses this plugin for cookie bar: Cookie Notice for GDPR & CCPA https://wordpress.org/plugins/cookie-notice/ It uses PHP to check of cookies ave been accepted : if ( function_exists(cn_cookies_accepted) && cn_cookies_accepted() ) // Your third-party non functional code here If accepted, it loads the scripts that Ive put in the if statement (Facebook pixel and Google Analytics). Of course, I need this cookie bar to be displayed for each users. Could you guide me please? Thank you, Cedric Hi, Cedric, Please refer to this link: https://docs.litespeedtech.com/lscache/lscwp/troubleshoot/#eu-cookie-consent Just remember to change the cookie name to corresponding one from the Cookie Notice plugin. Best regards Hi usabe, Thank you for your answer. Will this work as after the cookie is set, they use PHP functions in the header.php file in order to inject non-functional scripts? Kind regards, Cedric Hi, when you added that rewrite rule for vary then there will be 2 caches for each page 1 cache without that accepted cookie 1 cache with that accepted cookie then you can use whatever code you want to use , and server will judge which cache to use based on users cookie value Best regards, Ok thank you
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference