Title: Cache is causing CSS issues
Last modified: June 17, 2025

---

# Cache is causing CSS issues

 *  Resolved [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/)
 * For over a week I have been running into issues in WP-admin where CSS is not 
   loading, mostly on the Edit or Add posts pages. I haven’t changed any settings
   with the plugin at all. If I disable the plugin via the Toolbox, everything is
   good. I’ve cleared all caches, which resolves it for a short time but then the
   issue returns.
 * Here is a screen shot of my Admin –> New Post page showing the problem: [https://timemachiner.io/wp-content/uploads/2025/06/CSS-Issues.png](https://timemachiner.io/wp-content/uploads/2025/06/CSS-Issues.png)
 * The weird part is for Excludes I have **Do Not Cache Roles –> Administrator**
   checked.
 * **EDIT:** Forgot to generate a report when I posted. I’ve done so now: Report
   number WTYXRGTB.
 * Any help on this would be greatly appreciated. Thank you.
    -  This topic was modified 11 months, 1 week ago by [macstainless](https://wordpress.org/support/users/macstainless/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcache-is-causing-css-issues%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18517180)
 * [@macstainless](https://wordpress.org/support/users/macstainless/) 
   Ok, let’s
   try to figure this out.LSC will run same optimizations in admin area comparing
   to frontend. There are a few things that will be active but should not interfere
   with admin area.Have you tested disabling other plugins? Maybe test by disabling:`
   wp-asset-clean-up` Looking over report I think your htaccess need to be updated.
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18518270)
 * I kept the plugin disabled via the Toolbox setting. Now after seeing your reply,
   I re-enabled and everything is fine. I know that’s temporary as I think re-enabling
   flushes the cache. As soon as it triggers again, I’ll try disabling asset cleanup.
   Just know I’ve used that plugin for nearly 2 years (all the while with Lightspeed)
   and never has this issue come up.
 * Also, can you elaborate on the htaccess file? I know changes need to be made 
   at times, but I try not to mess with it too much. Guidance on what edits are 
   needed is appreciated.
 * Thanks. I’ll reply back the next time I get the CSS issue.
 *  Plugin Support [litetim](https://wordpress.org/support/users/litetim/)
 * (@litetim)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18518620)
 * [@macstainless](https://wordpress.org/support/users/macstainless/) 
   Allright,
   that will clear: `wp-asset-clean-up`
 * What is your hosting? Did some changes happen on server side? Did you activated
   some cache on hosting level?
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18519902)
 * I checked this morning and it’s happening. I went and disabled Asset Cleanup 
   and there’s no change. My “edit post” page looks just like the screen shot in
   my first post.
 * My hosting is on NameCheap. The LS cache plugin (I believe) integrates with their
   server side caching that’s part of the service.
 * I’ve made no changes to my hosting, sans creating a staging instance that has
   all plugins disabled on it.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18520063)
 * I don’t see anything from our plugin would cause thing like this
 * what do you see in browser dev tool on these JS/CSS request ?
 * any error ? 403 error or something ?
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18520079)
 * On my Edit Post page, here’s some items from the console I think may be helpful.
   I’ve redacted some of the values that come before the .html listings:
 * [Error] Refused to apply a stylesheet because its hash, its nonce, or ‘unsafe-
   inline’ does not appear in the style-src directive of the Content Security Policy.(
   controller-with-preconnect-{REDACTED}.html, line 1)
 * [Error] TypeError: null is not an object (evaluating ‘styleElement.sheet.insertRule’)
   
   applyCssapplyAdvancedBlockingDatahandleMessage
 *     ```wp-block-code
       handleMessage (advanced-script.js:262)
       ```
   
 * [Error] Refused to execute a script because its hash, its nonce, or ‘unsafe-inline’
   does not appear in the script-src directive of the Content Security Policy. (
   m-outer-{REDACTED}.html, line 0)
 * [Error] [Report Only] Refused to execute a script because its hash, its nonce,
   or ‘unsafe-inline’ does not appear in the script-src directive of the Content
   Security Policy. (m-outer-{REDACTED}.html, line 0)
 * [Error] [Report Only] Refused to apply a stylesheet because its hash, its nonce,
   or ‘unsafe-inline’ does not appear in the style-src directive of the Content 
   Security Policy. (m-outer-{REDACTED}.html, line 1)
   [Error] TypeError: null is
   not an object (evaluating ‘styleElement.sheet.insertRule’) — hidden:151handleMessage(
   advanced-script.js:262)[Error] Failed to load resource: You do not have permission
   to access the requested resource.[Error] Refused to execute a script because 
   its hash, its nonce, or ‘unsafe-inline’ does not appear in the script-src directive
   of the Content Security Policy. (inner.html, line 0)[Error] Refused to apply 
   a stylesheet because its hash, its nonce, or ‘unsafe-inline’ does not appear 
   in the style-src directive of the Content Security Policy. (inner.html, line 
   1)[Error] TypeError: null is not an object (evaluating ‘styleElement.sheet.insertRule’)—
   hidden:151handleMessage (advanced-script.js:262)[Error] Failed to load resource:
   You do not have permission to access the requested resource.
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18520082)
 * okay , looks like something with CSP
 * please try remove this line in your htaccess file `Header set Content-Security-
   Policy .....`
 * you have huge duplication on your .htaccess, I’d suggest to clean it up a bit
   first
    -  This reply was modified 11 months, 1 week ago by [qtwrk](https://wordpress.org/support/users/qtwrk/).
    -  This reply was modified 11 months, 1 week ago by [qtwrk](https://wordpress.org/support/users/qtwrk/).
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18520092)
 * Thanks. I’ll try removing that line and see what happens. In addition, I’ll look
   into cleaning up the file. I don’t go in there too often, so I have to see what’s
   going on and figure things out.
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18520153)
 * Okay, so right now things are working with a re-done .htaccess file, but until
   I take a deeper dive into the site, I won’t know if everything is 100%.
 * I created a new .htaccess file, populated it with WordPress defaults, and copied
   individual sections from the old file into this one. I took care not to duplicate
   anything. I then went into LSC’s dashboard and did a Save on its presets and 
   that populated the file too.
 * Right now the cache is on and the pages in wp-admin look okay. I will have to
   give it some time and see if the issue crops up. I’ll also have to explore parts
   of my site to see if anything else is not working. I did move the content security
   policy code in the new file in order to determine if the duplications or that
   was the issue.
 * I’ll update this when I know more. Thank you.
    -  This reply was modified 11 months, 1 week ago by [macstainless](https://wordpress.org/support/users/macstainless/).
      Reason: clarification
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [11 months, 1 week ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18521186)
 * okay , thanks, if it ever happens again , please remember check the dev tool ,
   see if there is any error message or something.
 *  Thread Starter [macstainless](https://wordpress.org/support/users/macstainless/)
 * (@macstainless)
 * [11 months ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18529896)
 * Just following up on this that I’ve not encountered further issues since cleaning
   my .htaccess file. I made no other changes, so it looks like that was it. I’m
   really unsure how so much duplication took place, but all seems to be good. Thank
   you for your help!

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Cache is causing CSS issues’ is closed to new replies.

 * ![](https://ps.w.org/litespeed-cache/assets/icon-256x256.png?rev=2554181)
 * [LiteSpeed Cache](https://wordpress.org/plugins/litespeed-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/litespeed-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/litespeed-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/litespeed-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/litespeed-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/litespeed-cache/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 11 replies
 * 3 participants
 * Last reply from: [macstainless](https://wordpress.org/support/users/macstainless/)
 * Last activity: [11 months ago](https://wordpress.org/support/topic/cache-is-causing-css-issues/#post-18529896)
 * Status: resolved