{"id":2677,"date":"2019-10-23T09:23:09","date_gmt":"2019-10-23T01:23:09","guid":{"rendered":"https:\/\/www.mondoze.com\/guide\/?post_type=kb&p=2677"},"modified":"2022-10-05T08:02:27","modified_gmt":"2022-10-05T00:02:27","slug":"why-isnt-auto-minify-working","status":"publish","type":"kb","link":"https:\/\/www.mondoze.com\/guide\/kb\/why-isnt-auto-minify-working","title":{"rendered":"Why isn’t Auto Minify working?"},"content":{"rendered":"\t\t
Once enabled, Cloudflare’s Auto minify will minify your HTML and your cached CSS & JS files. If you view the source of your files in your web browser or via a command line tool such as cURL and you do not see the code being minified – here are some things you should check:<\/p>
.min<\/code>\u00a0in their name<\/li>- If your code has fatal syntax errors, auto minify may not be able to successfully minify the code – use the syntax checkers below on your files to confirm this<\/li>
- We will not minify inline js\/css inside your html<\/li><\/ul>
If you want to manually confirm whether your files are getting minify, you can use a tool such as cURL to compare the response with and without Cloudflare – use this guide to learn how to do that or you can view the source code in your browser directly.<\/p>
To check the syntax of your HTML \/ CSS or JS files we recommend using online validators \/ tools such as the following to look for potential issues:<\/p>
- HTML:\u00a0https:\/\/validator.w3.org\/<\/li>
- CSS:\u00a0http:\/\/jigsaw.w3.org\/css-validator\/<\/li>
- JavaScript:\u00a0http:\/\/www.javascriptlint.com\/online_lint.php<\/li><\/ul>
If you see that minification still isn\u2019t taking effect after checking these steps, please\u00a0contact Cloudflare Support. You should include the URLs of the resources that you are seeing issues with.<\/p>
Note:<\/strong>\u00a0CSS & JS minification will operate on cached CSS and JS files only. Once Cloudflare returns a cache HIT for the file it will be return to browsers in minify form. This allows us to deliver a more complete minification result. If you need to enable or disable minification for CSS & JS you will now need to purge your Cloudflare cache to see the effect of any minification setting change.<\/p>\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"Why isn’t Auto Minify working? Once enabled, Cloudflare’s Auto minify will minify your HTML and your cached CSS & JS files. If you view the source of your files in your web browser or via a command line tool such as cURL and you do not see the code being minified – here are some …<\/p>\n