Cloudflare is not caching css files automatically

There are a lot of stuff Cloudflare is not caching by default, is there a way to cache everything sent with those headers?

Also why Cloudflare is not caching and minifying some.css and .js even with a page rule? Does it looks only to the URL? the URL ends with .json, but not all end with .css but the headers says content-type: text/css; charset=utf-8 but still not caching or minifying.

Thanks <3 should answer these questions.

1 Like

Yeah, according to that link it should be caching my css files but it’s not…does it look at the content-type or cache-control or just the URL alone?

The specific URL is this:

I don’t like using a page rule to cache something that should be cached already…I rather learn why this happens and how I can fix it.


The URL you mentioned does not have one of the cached extensions, so it wont be cached. You would need to rename it to css.css for it to be cached.

Ok. Thanks that proves my theory that it’s only looking at the URL itself. Why not use the content-type headers?

See my first link please.

Cloudflare does not cache by MIME type at this time.

Ah ok. My bad for not knowing this = content headers in the requests sorry.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.