Title: CSS and JavaScript 404
Last modified: June 18, 2020

---

# CSS and JavaScript 404

 *  Resolved [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/css-and-javascript-404/)
 * Hi,
 * Last night I encountered an issue where the site’s CSS was not displaying. In
   the developer tools I could see that the Litespeed-cached CSS file was returning
   a 404. From what I could tell the HTML page cache had cached a reference to a
   CSS file that no longer existed. When I purged it everything started working 
   again.
 * My theory is that somebody had pressed _Purge All – CSS/JS Cache_ without also
   purging the page cache. Is there any other reason this might have occurred? Surely
   the plugin is smart enough under normal circumstances to clear the page cache
   if any referenced resources are also purged? What can I do to protect against
   this in future?
 * Thanks

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

 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/css-and-javascript-404/#post-13001257)
 * Hi,
 * Could you please go to Cache –> Purge —> set Purge Stale or Serve Stale to OFF?
 * Best regards,
 *  Thread Starter [Jacob Peattie](https://wordpress.org/support/users/jakept/)
 * (@jakept)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/css-and-javascript-404/#post-13001360)
 * I’ve set this setting to OFF.
 * If I’m understanding correctly, if this setting was responsible, it shouldn’t
   have been issue for more than a few minutes, right? While the cache generates?
 *  Plugin Support [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * (@qtwrk)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/css-and-javascript-404/#post-13001370)
 * Hi,
 * By design , yes , but as this is newly added feature , maybe a bug from server-
   side.
 * to me this is kind of like out-of-sync issue.
 * when you do a purge all , with stale
 * for example you have a page , link to 12345.js , 12345.css
 * once you purged all , these 2 js/css will be deleted and new one generated with
   new name, like abcde.css and abcde.js
 * then the main page is still serving in staled cache , as it still links to 12345.
   js/css , then you got 404

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

The topic ‘CSS and JavaScript 404’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [qtwrk](https://wordpress.org/support/users/qtwrk/)
 * Last activity: [5 years, 9 months ago](https://wordpress.org/support/topic/css-and-javascript-404/#post-13001370)
 * Status: resolved