CSS & JS Minification and CCSS not working for Search Results pages (v4.2)




Wordpress LScache Plugin: CSS & JS Minification and CCSS not working for Search Results pages (v4.2)

Last Updated on: Wed, 15 Apr 2026 00:00:02
Minification and critical css does not work for the internal search results pages on my site which is built with DIVI. Everything worked ok before updating from 3.6.4. I have rolled back to 3.6.4 due to that and some other issues with broken CSS. Hi, Can you explain or provide a screenshot for your site on how css does not work? Please provide your report number as well, you can get it in sidebar menu > Litespeed Cache > Toolbox > Report > click Send to Litespeed . Regards, Lehan When I view source code (or gtmetrix waterfall view, pagespeed insights, etc) for search pages, I see the original unminified is and css files are called ? not the minified versions. This occurs only on the search and search results pages, like mydomain.com/search/search+term All other pages and posts use minified CSS and JS as expected. please follow this guide to enable debug log and grab the log to see what was happening during the page generation , for why it doesnt work WJTKTLFL report sent I found where the plugin prevents caching of search pages in wp-content/plugins/litespeed-cache/src/control.cls.php and commented out this: if ( is_search() ) return $this->_no_cache_for(search) Since I am not using the cache, only optimization, this works for me. Perhaps optimization should not be dependent on caching status of the page. well, I believe the logic behind that is if a page is not cached and each time process it will run through all the optimization process, that could be resources-intensive your solution will be overriden if you update the plugin , maybe you can try this way go to Cache -> force cache URI , add the URI with 1 second of TTL , which is literally to no-cache ,e.g. search/search 1 this way you should be able to bypass that cache check without edit the plugin file Im aware it will be overwritten. I pointed out the problem so it could be fixed in a future version. Search pages received minified css and js without any problems under 3.6.4. One css file and one js file for all search pages was not a burden on server at all. I will try your solution, but since I am not using caching via litespeed (Im not on a litespeed server), I doubt that will work. for the plugin part , it doesnt really care if its apache or litespeed, it just sends out the cache header, e.g. X-LiteSpeed-Cache-Control: public,max-age=3600 or something , if its apache, apache will ignore it , if its LSWS, then it will cache the page so the logic here should be same for apache or lsws when on that check.



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



Reference