Cached CSS files intermittently stored with HTML mime type

cache

#1

Hey everyone!

Some of our users report our website as being completely un-styled. Everything else works fine on the site. After digging in with a couple customers, I’ve found that the css files are being served but their MIME type is html and browsers won’t apply css on files that have html MIME types.

This issue appears to be regional as well, as often the users would have their friends view the site and they too would have the problem. Emptying local caches and hard reloading did not resolve the problem.

On a hunch I started purging the css files causing the issue from the cloudflare cache. I then had users empty their browser’s cache as well. This solves the problem but the issue crops up every now and then. I’m curious if anyone else has had this issue and would appreciate any suggestions :slight_smile:

Thanks!


#2

Do you have something on your site that’s optimizing CSS files?


#3

Hey sdayman!
Thanks for the response.

We use create-react-app, version 2.1.8, which minifies the css. I don’t believe we use anything else as we don’t currently use the cloudflare auto-minify service.

Charles