Cloudflare minification is terrible


Take this minified file and check it’s size. It’s around 85KB.

Now get the unminified version at which is around 250KB.

Now take the unminified version and put in your webserver that uses Cloudflare. Enable CSS/JS/HTML MINIFICATION. Now try to access the file on your browser.

I did exacty that. Indeed, Cloudflare IS MINIFYING the file HOWEVER the final size is 140KB! Is terribly minified, it’s almost twice the size of the already minified file provided by Jquery library.

What is going on? Why does cloudflare minification is so terrible?


I guess when cf says minification they mean only remove white space and some new lines, while cdnjs actually taking another step and uglify the code to make it smaller(changing variable names and other tricks)

I understand cloudflare as when you entering into uglify you can end up with some bug and errors and some rare edge cases they probably cant count on it in their scale…

but the real answer is: don’t count on cloudflare for js minification… just minify it yourself


That’s what I guessed… cloudflare minification is terrible, it is only removing newlines, spaces and a few comments (not all comments are removed).