We have our Cloudflare account set to Auto Minify CSS. However, many of our CSS files are not getting minified. Blank lines, white space, comments, etc are all still visible in the file.
I have even created a page rule for minifying these files, and getting the same result.
I have tried clearing the cache for these files, even clearing my cache, and they are not being minified.
The files have a .css file extension and are being served with the correct mime type from the server.
I have been reading some of the posts about minification and see Cloudflare may not optimize them as good as possible, but I am expecting something more than this…
Its not quite clear to me why Cloudflare cant minify it. It does not seem to be the file itself, as I do get the file minified when served over a different domain.
On the other hand however it does not seem to be specific to the OP’s domain either as the other CSS file does get minified and there is no major difference in response headers. I briefly suspected the uppercase CSS could influence it, but https://homefurn.com/Themes/Brooklyn/Content/css/1280.css does not get minified either.
For a bit I only received a miss for both the files, indicating it’s not cached so not minified; 1280.css was a miss consistently but now is a hit. More digging to do.
Curious to see if maybe there was an error in the CSS in that file, I ran the CSS through the linter at http://csslint.net and only received a few warnings but no errors… hmm
Hi @jphifer, I’m not turning up much of anything, different validators give different warnings, but no errors. One gave one warning, another over 20, which is when I suspected the large number of warnings was causing a parsing that @sdayman mentioned. But, as @sandro pointed out, it works on other domains.
I’d like to get other eyes on this for input. Can you login to Cloudflare and then open a ticket with Cloudflare Support. Support is very busy at the moment and it will take them some time, but it’s worth having them look at it. If you can, share the ticket number and I’ll get it into the right queue.