Title: Missing stylesheets referenced in HTML &#8211; race condition?
Last modified: December 14, 2023

---

# Missing stylesheets referenced in HTML – race condition?

 *  Resolved [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/)
 * (@jamieburchell)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/)
 * I am trying to resolve a long standing issue with W3TC where after a full cache
   purge, loading a page results in missing CSS caused by stylesheet references 
   in the HTML that 404. It doesn’t always happen, and I’ve suspected this is due
   to some sort of race condition where visitors are hitting the site while the 
   cache in being purged.
 * Do you know what order the purge is done in? The way it currently fails, the 
   CSS is missing even after repeatedly refreshing the page which make me wonder
   if the page cache is flushed before the CSS/JS cache? If so, is there a way to
   swap it around?
 * Another thought would be if the plugin could not generate cache files if it is
   currently purging the cache.
 * Thanks!

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

 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17278040)
 * Hello [@jamieburchell](https://wordpress.org/support/users/jamieburchell/)
 * Thank you for reaching out and I am happy to help!
   Without knowing some details
   about your setup and the website URL, I am unable to provide a specific answer.
   Can you please share the website URL, and also the theme and the settings used
   in the W3 Total Cache?
 * Since this is not something that has been reported before, we need to investigate
   this and find out what in the W3 Total Cache may be responsible for this behavior.
 * Thanks!
 *  Thread Starter [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/)
 * (@jamieburchell)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17278071)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/)
 * It might be related to [this issue](https://github.com/BoldGrid/w3-total-cache/issues/759)
   I opened a while back where the same was happening and also causing a PHP error.
   The PHP error has gone, but the behaviour observed is still there.
 * These are Elementor/Elementor Pro websites using the Hello theme. Config [here](https://pastebin.com/raw/20SUFcwH).
 * It’s not one specific site, it’s something that generally happens.
 *  Plugin Contributor [Marko Vasiljevic](https://wordpress.org/support/users/vmarko/)
 * (@vmarko)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17278539)
 * Hello [@jamieburchell](https://wordpress.org/support/users/jamieburchell/)
 * As I can see you are using minify, so can you please
 * disable minify in Perfirmance>General settings, save all settings and purge the
   cache and see if the issue persists?
   If the issue is gone, re-enable minify, 
   and disable the settings in Performance>minify one by one (HTML minify, JS minify,
   CSS minify) and see which one might be causing the issue.Make sure to save all
   settings and purge the cache after each option is disabled.Thanks!
 *  Thread Starter [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/)
 * (@jamieburchell)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17278924)
 * Hi [@vmarko](https://wordpress.org/support/users/vmarko/)
 * The problem is most of the time it works, only very occasionally I run in to 
   this, and I don’t want to leave minify off for long periods of time. I can’t 
   reproduce the error on demand hence the questions about order of purging. I’ll
   continue to investigate as time permits.
 *  Thread Starter [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/)
 * (@jamieburchell)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17285093)
 * [@vmarko](https://wordpress.org/support/users/vmarko/)
 * I have an update for you. I ran in to this issue this morning and when I checked
   the stylesheets that are being referenced they return a 400 response with the
   text “400 Bad Request Please see [http://code.google.com/p/minify/wiki/Debugging](http://code.google.com/p/minify/wiki/Debugging).”
 * After I purged the caches again, all was well.
    -  This reply was modified 2 years, 3 months ago by [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/).

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

The topic ‘Missing stylesheets referenced in HTML – race condition?’ is closed to
new replies.

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

 * 5 replies
 * 2 participants
 * Last reply from: [Jamie Burchell](https://wordpress.org/support/users/jamieburchell/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/missing-stylesheets-referenced-in-html-race-condition/#post-17285093)
 * Status: resolved