Wordpress LScache Plugin: CSS lost on some pages
Last Updated on: Wed, 15 Apr 2026 00:00:02 Hello, LiteSpeed Report ID: IGDVAAMZ Weve noticed an issue on a few of our clients sites recently which all use the LiteSpeed page optimisations. Sometimes when viewing a page the CSS does not appear for that page, meaning the page basically loads as plain text. This always seems to target a specific page e.g. it doesnt effect the whole site and usually the issue resolves itself when the LiteSpeed CSS is rebuilt. Weve only noticed this error since updating to the latest version of LiteSpeed. Any advice please? We dont want to disable LiteSpeed optimisations as they help with our Google PageSpeed score. Thanks. Hi, Please check the browsers dev tool when that happens , you should see some error on CSS request, please check what is the error there, like mix-content , or 404 , or 403 or something ? Best regards, Hi @CacheCrawler Weve not been able to replicate this issue ourselves yet, weve only had reports from clients regarding this issue. If we look at our apache logs we cant see any LiteSpeed css requests when the user visits the broken page. e.g. we would usually expect to see something like the following: GET /wp-content/litespeed/cssjs/d350b.css?4e062 HTTP/2 200 But we do not see this when we review the logs after a user report the problem to us. Thanks. Hi, we do not see this when we review the logs after a user report the problem to us. now this makes issue more weird. I mean , if user requested it , even its broken link , it will at least, respond 404 error if you dont even find any trace of it , that means the users browser did NOT even request this file , only possible case I can think of is the mixed content , that case , browser will directly deny it without requesting to server. pleaase try : 1. check your setting , if both URL are set to https:// and please do double check in database, I have seen a case, even both link in wp setting page shows https:// but DB still gives http:// for whatever reason it was. 2. try implement Content-Security-Policy: upgrade-insecure-requests header , this will instruct browser to automatically send https request when sees http request. Best regards, Hi @CacheCrawler Thanks for the reply. Ive checked our domain settings and these are configured correctly. We already have content security policy in place configured by our htaccess file. We dont think mixed content is to blame here. As nothing shows in the logs for a LiteSpeed css request on this page we believe the LiteSpeed CSS was not included in the page source and thus the visitors browser didnt request it. Any ideas if this is feasible? If an error occurs with the LiteSpeed CSS merging would the file potentially not be included in the header of the page? Thanks. Hi, Any ideas if this is feasible? If an error occurs with the LiteSpeed CSS merging would the file potentially not be included in the header of the page? hmmmm ,well , in theory , yes , if something wrong during the CSS optm , it would leads to empty file or not being inserted into page but I have never seen such case so far, the worst case so far I see if that if page is problematic , LSCWP will bypass itself to do anything. I was looking at the code if ( $this->cfg_css_comb ) $url = $this->_build_hash_url( $src_list ) // Handle css async load if ( $this->cfg_css_async ) $this->html_head .= // todo: How to use in attr wrapper else $this->html_head .= // use 2 as combined // Move all css to top $this->content = str_replace( $html_list, , $this->content ) // Add to HTTP2 $this->append_http2( $url ) did you happen to have CSS push enabled ? if that so , maybe we can check from that direction , like if it is pushed, but not in HTML Best regards, Hi @CacheCrawler Many thanks for the reply. We use the following CSS settings: ? CSS Minify => ON ? CSS Combine => ON ? CSS HTTP/2 Push => ON ? Inline CSS Async Lib = > ON All other CSS settings are OFF. Thanks. Hi, okay, you do have css push , but still , we will need to a way to reproduce the issue to verify your theory Best regards, Hi, Im going to mark this topic Resolved , due to lack of activity. If you still need help, please feel free to re-open it. When re-open it, please also change the topic status to not solved Best regards, Hi @CacheCrawler We are struggling to find reliable replication steps as the issue seems to occur at random on certain pages after making changes (not necessarily on the same page). Where do we go from here? Are you suggesting disabling HTTP/2 Push might be a good idea? Thanks. Hi, No , upon our last conversation: you thought maybe CSS was not included into HTML source , in which I suggest to , check the HTTP header , because as you have enabled push , these files will be shown up in response header as link header to push resources. so this way , you can compare the HTML source code and HTTP response header to see if the CSS files are same on both sides. Best regards, Hi @CacheCrawler , This issue has become a lot more common recently on our clients websites. Weve noticed that when the issue occurs the CSS is included in the CSS HTML source so thats not the cause of the issue. What is the cause is the CSS that is being generated by LiteSpeed. E.g. Recently the About Us page on our website suffered this issue. During this time the following file wp-content/litespeed/cssjs/ded8b.css?37e3d was only 25.8kB missing the majority if not all of our styles. After flushing the LiteSpeed cache the page returned to normal and the stylesheet changed to /wp-content/litespeed/cssjs/8b0ee.css?af9cf with a size of 177kB. So LiteSpeed had generated a CSS file for the page with 150kB of styles missing from the stylesheet. As mentioned previously this issue has become increasingly common so would appreciate any advice as when this issue occurs its basically makes the site completely unusable for any visitors until we flush the cache. Thanks. Hi, please create a ticket by mail to support at litespeedtech.com my colleague will follow you up Best regards,
LiteCache Rush: Speed comes from using less, not from doing it faster
Reference