PHP cookie detection




Wordpress LScache Plugin: PHP cookie detection

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, Having an issue with cookie detection. This works well without caching. For the Dark theme preference, PHP should check if the cookie is present and make changes accordingly. Cookie is properly set and removed by clicking a button. When I refresh the page, it will either have or not have the cookie, based on the users actions. So, this is working as expected. But, PHP does not alter the code, regardless of whether the cookie is set or not. I have excluded this cookie is LS settings. Any help will be greatly appreciated. Regards, Jovan Hi, please try add this , at top of your .htaccess RewriteRule . - [E=Cache-Vary:your_cookie_name] then purge all Hi, Tried it. Didnt work. When you empty entire cache, it will show a few pages without cache. But, when you return to those pages with a new setting, youll get a page with the old setting. please provide the report number you can get it in toolbox -> report -> click send to LiteSpeed



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference