{"id":1655,"date":"2020-06-07T22:43:24","date_gmt":"2020-06-07T14:43:24","guid":{"rendered":"https:\/\/www.wesbytes.com\/guide\/?post_type=kb&#038;p=1655"},"modified":"2026-01-12T13:41:52","modified_gmt":"2026-01-12T05:41:52","slug":"why-isnt-auto-minify-working","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/why-isnt-auto-minify-working","title":{"rendered":"Why isn\u2019t Auto Minify working?"},"content":{"rendered":"<h3><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/caffeineonice.gallerycdn.vsassets.io\/extensions\/caffeineonice\/autominify\/3.0.3\/1723991344503\/Microsoft.VisualStudio.Services.Icons.Default\" alt=\"Auto Minify working\" width=\"432\" height=\"432\" \/><\/h3>\n<h3><strong>Why isn\u2019t Auto Minify working?<\/strong><\/h3>\n<p>Once enabled, <a href=\"https:\/\/www.cloudflare.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Cloudflare<\/a>\u2019s Auto minify will minify your HTML and your cached CSS &amp; 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 \u2013 here are some things you should check:<\/p>\n<ul>\n<li>Only files that are serve via your orange-cloud DNS records will be minify \u2013 so code on 3rd party domains that are not using Cloudflare will not be minify<\/li>\n<li>For CSS &amp; JS only cache HITs will be minified \u2013 use\u00a0this guide\u00a0to check an individual file\u2019s cache status.<\/li>\n<li>The feature will deliberately skip minification for files that contain\u00a0<code>.min<\/code>\u00a0in their name<\/li>\n<li>If your code has fatal syntax errors, auto minify may not be able to successfully minify the code \u2013 use the syntax checkers below on your files to confirm this<\/li>\n<li>We will not minify inline js\/css inside your html<\/li>\n<\/ul>\n<p dir=\"auto\">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 \u2013 use this guide to learn how to do that or you can view the source code in your browser directly.<\/p>\n<div class=\"mkb-anchor mkb-clearfix mkb-back-to-top-inline\">\n<h6 class=\"mkb-anchor__title\" dir=\"auto\">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:<\/h6>\n<\/div>\n<ul type=\"disc\">\n<li>HTML:\u00a0https:\/\/validator.w3.org\/<\/li>\n<li>CSS:\u00a0http:\/\/jigsaw.w3.org\/css-validator\/<\/li>\n<li>JavaScript:\u00a0http:\/\/www.javascriptlint.com\/online_lint.php<\/li>\n<\/ul>\n<p dir=\"auto\">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>\n<p dir=\"auto\"><strong>Note<\/strong>\u00a0CSS &amp; 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 &amp; JS you will now need to purge your Cloudflare cache to see the effect of any minification setting change.<\/p>\n<p dir=\"auto\">\n<p dir=\"auto\"><span data-sheets-root=\"1\">Please refer to the following article to know more.<br \/>\nKnowledge Base: <a href=\"https:\/\/www.servergigabit.com\/guide\/kb\/does-auto-minify-impact-third-party-script\">Does Auto Minify Affect Third-Party Script? Critical Facts You Must Know<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why isn\u2019t Auto Minify working? Once enabled, Cloudflare\u2019s Auto minify will minify your HTML and your cached CSS &amp; 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 \u2013 here are some things you should check: Only&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[43],"kbtag":[1398],"class_list":["post-1655","kb","type-kb","status-publish","hentry","kbtopic-cloudflare","kbtag-auto-minify"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1655","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=1655"}],"version-history":[{"count":4,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1655\/revisions"}],"predecessor-version":[{"id":6001,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/1655\/revisions\/6001"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=1655"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=1655"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=1655"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}