Any way of minifying an already minified file?

Hi all,

Is there a way to minify a CSS/JS file that contains “.min” in the name?

By design, Cloudflare won’t minify files that contain “.min” in the filename such as “…/myscript.min.css” or “…/mysscript.min.js”. I would like to know if it’s possible to bypass/override this rule.

The service and servers I use naturally already minifies and concatenates the files. However, I see still few comments, line returns and so on are still visible. I understand CF won’t uglify and has a very conservative minifying algorithm. It works great for HTML minifying. So I would like to test cf minifying those already minified files. Any ideas of a configuration rule or something?


Hello, Monox!

I don’t think that this is possible.

I would recommend that you simply deactive the minify and compress features on your server and let Cloudflare do the work.

Hi WhiteDemonhia,

Thanks for the quick reply.

Sadly that is not possible. I’m using Odoo online hosting, which means Software as a service, which means I have no access to server configuration. I can only modify their qweb templates, basically html files.

There are some workarounds where I would hardcode into the html template, the unminified files and test the performance, however, I prefer not to do that. Just wanted to see if there’s an out of the box way of using CF’s algorithms.

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