PluginProbe
Autoptimize / 3.1.16
Autoptimize v3.1.16
3.1.16 2.2.2 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.4 2.5.0 2.5.1 2.6.0 2.6.1 2.6.2 2.7.0 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 All 108 releases
← All changes | readme.txt +246 -353 2.2.2 → 3.1.16 View file →
@@ -1,22 +1,27 @@
1 1 === Autoptimize ===
2 -Contributors: futtta, optimizingmatters, turl
3 -Tags: css, javascript, optimize, minify, performance
2 +Contributors: futtta, optimizingmatters, zytzagoo, turl
3 +Tags: optimize, performance, images, core web vitals, pagespeed
4 4 Donate link: http://blog.futtta.be/2013/10/21/do-not-donate-to-me/
5 -Requires at least: 4.0
6 -Tested up to: 4.9
7 -Stable tag: 2.2.2
5 +License: GPLv3
6 +License URI: [https://www.gnu.org/licenses/gpl-3.0.html](https://www.gnu.org/licenses/gpl-3.0.html)
7 +Requires at least: 5.3
8 +Tested up to: 7.1
9 +Requires PHP: 7.4
10 +Stable tag: 3.1.16
8 11
9 -Autoptimize speeds up your website and helps you save bandwidth by aggregating and minimizing JS, CSS and HTML.
12 +Autoptimize speeds up your website by optimizing JS, CSS, images (incl. lazy-load), HTML and Google Fonts, asyncing JS, removing emoji cruft and more.
10 13
11 14 == Description ==
12 15
13 -Autoptimize makes optimizing your site really easy. It can aggregate, minify and cache scripts and styles, injects CSS in the page head by default and can move and defer scripts to the footer. It also minifies the HTML code itself, making your page really lightweight. There are advanced options and an extensive API available to enable you to tailor Autoptimize to each and every site's specific needs. And it can even improve your site's performance when on HTTP/2!
16 +Autoptimize makes optimizing your site really easy. It can aggregate, minify and cache scripts and styles, injects CSS in the page head by default but can also inline critical CSS and defer the aggregated full CSS, moves and defers scripts to the footer and minifies HTML. You can optimize and lazy-load images (with support for WebP and AVIF formats), optimize Google Fonts, async non-aggregated JavaScript, remove WordPress core emoji cruft and more. As such it can improve your site's performance even when already on HTTP/2! There is extensive API available to enable you to tailor Autoptimize to each and every site's specific needs.
17 +If you think performance indeed is important, you should at least consider one of the many free page caching plugins (e.g. [Speed Booster pack](https://wordpress.org/plugins/speed-booster-pack/) or [KeyCDN's Cache Enabler](https://wordpress.org/plugins/cache-enabler)) to complement Autoptimize or even [consider Autoptimize Pro](https://misc.optimizingmatters.com/partners/?from=partnertab&partner=aopro) which not only has page caching but also image optimization, CDN, critical CSS and more!
14 18
15 -If you consider performance important, you really should use one of the many caching plugins to do page caching. Some good candidates to complement Autoptimize that way are e.g. [WP Super Cache](http://wordpress.org/plugins/wp-super-cache/), [HyperCache](http://wordpress.org/plugins/hyper-cache/), [Comet Cache](https://wordpress.org/plugins/comet-cache/) or [KeyCDN's Cache Enabler](https://wordpress.org/plugins/cache-enabler).
19 +> <strong>Autoptimize Pro</strong><br>
20 +> [Autoptimize Pro is a premium Power-Up](https://misc.optimizingmatters.com/partners/?from=partnertab&partner=aopro), adding image optimization, CDN, page caching, automatic critical CSS rules and extra “booster” options, all in one handy subscription to [make your site even faster!](https://misc.optimizingmatters.com/partners/?from=partnertab&partner=aopro)!
16 21
17 22 > <strong>Premium Support</strong><br>
18 -> We provide great [Autoptimize Pro Support and Web Performance Optimization services](http://autoptimize.com/), check out our offering on (http://autoptimize.com/)!
23 +> We provide great [Premium Support and Web Performance Optimization services](https://misc.optimizingmatters.com/partners/?from=partnertab&partner=autoptimizepro) with Accelera, check out our offering on [https://accelerawp.com/](https://misc.optimizingmatters.com/partners/?from=partnertab&partner=autoptimizepro)!
19 24
20 25 (Speed-surfing image under creative commons [by LL Twistiti](https://www.flickr.com/photos/twistiti/818552808/))
21 26
22 27 == Installation ==
@@ -30,25 +35,25 @@
30 35 == Frequently Asked Questions ==
31 36
32 37 = What does the plugin do to help speed up my site? =
33 38
34 -It concatenates all scripts and styles, minifies and compresses them, adds expires headers, caches them, and moves styles to the page head, and scripts (optionally) to the footer. It also minifies the HTML code itself, making your page really lightweight.
39 +It minifies all scripts and styles and configures your webserver to compresses them with good expires headers. JavaScript be default will be made non-render-blocking and CSS can be too by adding critical CSS. You can configure it to combine (aggregate) CSS & JS-files, in which case styles are moved to the page head, and scripts to the footer. It also minifies the HTML code and can also optimize images and Google Fonts, making your page really lightweight.
35 40
36 41 = But I'm on HTTP/2, so I don't need Autoptimize? =
37 42
38 -HTTP/2 is a great step forward for sure, reducing the impact of multiple requests from the same server significantly by using the same connection to perform several concurrent requests. That being said, [concatenation of CSS/ JS can still make a lot of sense](http://engineering.khanacademy.org/posts/js-packaging-http2.htm), as described in [this css-tricks.com article](https://css-tricks.com/http2-real-world-performance-test-analysis/) and this [blogpost from one of the Ebay engineers](http://calendar.perfplanet.com/2015/packaging-for-performance/). The conclusion; configure, test, reconfigure, retest, tweak and look what works best in your context. Maybe it's just HTTP/2, maybe it's HTTP/2 + aggregation and minification, maybe it's HTTP/2 + minification (which AO can do as well).
43 +HTTP/2 is a great step forward for sure, reducing the impact of multiple requests from the same server significantly by using the same connection to perform several concurrent requests and for that reason on new installations Autoptimize will not aggregate CSS and JS files any more. That being said, [concatenation of CSS/ JS can still make a lot of sense](http://engineering.khanacademy.org/posts/js-packaging-http2.htm), as described in [this css-tricks.com article](https://css-tricks.com/http2-real-world-performance-test-analysis/) and this [blogpost from one of the Ebay engineers](http://calendar.perfplanet.com/2015/packaging-for-performance/). The conclusion; configure, test, reconfigure, retest, tweak and look what works best in your context. Maybe it's just HTTP/2, maybe it's HTTP/2 + aggregation and minification, maybe it's HTTP/2 + minification (which AO can do as well, simply untick the "aggregate JS-files" and/ or "aggregate CSS-files" options). And Autoptimize can do a lot more then "just" optimizing your JS & CSS off course ;-)
39 44
40 45 = Will this work with my blog? =
41 46
42 -Although Autoptimize comes without any warranties, it will in general work flawlessly if you configure it correctly. See "Troubleshooting" below for info on how to configure in case of problems.
47 +Although Autoptimize comes without any warranties, it will in general work flawlessly if you configure it correctly. See "Troubleshooting" below for info on how to configure in case of problems. If you want you can [test Autoptimize on a new free dummy site, courtesy of tastewp.com](https://demo.tastewp.com/autoptimize).
43 48
44 -= Why is jquery.js not optimized =
49 += Why is jquery.min.js not optimized when aggregating JavaScript? =
45 50
46 -Starting from AO 2.1 WordPress core's jquery.js is not optimized for the simple reason a lot of popular plugins inject inline JS that is not aggregated either (due to possible cache size issues with unique code in inline JS) which relies on jquery being available, so excluding jquery.js ensures that most sites will work out of the box. If you want optimize jquery as well, you can remove it from the JS optimization exclusion-list (you might have to enable "also aggregate inline JS" as well or switch to "force JS in head").
51 +Starting from AO 2.1 WordPress core's jquery.min.js is not optimized for the simple reason a lot of popular plugins inject inline JS that is not aggregated either (due to possible cache size issues with unique code in inline JS) which relies on jquery being available, so excluding jquery.min.js ensures that most sites will work out of the box. If you want optimize jquery as well, you can remove it from the JS optimization exclusion-list (you might have to enable "also aggregate inline JS" as well or switch to "force JS in head").
47 52
48 53 = Why is Autoptimized JS render blocking? =
49 54
50 -If not "forced in head", Autoptimized JS is not render blocking as it has the "defer" flag added. It is however possible another plugin removes the "defer"-flag. Speed Booster Pack was reported doing this, but [the behavior has not been confirmed yet](https://wordpress.org/support/topic/speed-booster-pack-autoptimized-js-defer-flag/).
55 +This happens when aggregating JavaSCript and ticking the "force in head" option or when not aggregating and not deferring. Consider changing settings.
51 56
52 57 = Why is the autoptimized CSS still called out as render blocking? =
53 58
54 59 With the default Autoptimize configuration the CSS is linked in the head, which is a safe default but has Google PageSpeed Insights complaining. You can look into "inline all CSS" (easy) or "inline and defer CSS" (better) which are explained in this FAQ as well.
@@ -58,22 +63,14 @@
58 63 CSS in general should go in the head of the document. Recently a.o. Google started promoting deferring non-essential CSS, while inlining those styles needed to build the page above the fold. This is especially important to render pages as quickly as possible on mobile devices. As from Autoptimize 1.9.0 this is easy; select "inline and defer CSS", paste the block of "above the fold CSS" in the input field (text area) and you're good to go!
59 64
60 65 = But how can one find out what the "above the fold CSS" is? =
61 66
62 -There's no easy solution for that as "above the fold" depends on where the fold is, which in turn depends on screensize. There are some tools available however, which try to identify just what is "above the fold". [This list of tools](https://github.com/addyosmani/above-the-fold-css-tools) is a great starting point. [http://jonassebastianohlsson.com/criticalpathcssgenerator/](http://jonassebastianohlsson.com/criticalpathcssgenerator/) is a nice basic solution and [http://criticalcss.com/](http://misc.optimizingmatters.com/partners/?from=faq&amp;partner=critcss) is a premium solution by the same developer. Alternatively [this bookmarklet](https://gist.github.com/PaulKinlan/6284142) (Chrome-only) can be helpful as well.
67 +There's no easy solution for that as "above the fold" depends on where the fold is, which in turn depends on screensize. There are some tools available however, which try to identify just what is "above the fold". [This list of tools](https://github.com/addyosmani/above-the-fold-css-tools) is a great starting point. The [Sitelocity critical CSS generator](https://www.sitelocity.com/critical-path-css-generator) and [Jonas Ohlsson's criticalpathcssgenerator](http://jonassebastianohlsson.com/criticalpathcssgenerator/) are nice basic solutions and [http://criticalcss.com/](http://misc.optimizingmatters.com/partners/?from=faq&amp;partner=critcss) is a premium solution by the same Jonas Ohlsson. Alternatively [this bookmarklet](https://gist.github.com/PaulKinlan/6284142) (Chrome-only) can be helpful as well.
63 68
64 69 = Or should you inline all CSS? =
65 70
66 -The short answer: probably not.
71 +The short answer: probably not. Although inlining all CSS will make the CSS non-render blocking, it will result in your base HTML-page getting significantly bigger thus requiring more "roundtrip times". Moreover when considering multiple pages being requested in a browsing session the inline CSS is sent over each time, whereas when not inlined it would be served from cache. Finally the inlined CSS will push the meta-tags in the HTML down to a position where Facebook or Whatsapp might not look for it any more, breaking e.g. thumbnails when sharing on these platforms.
67 72
68 -Back in the days CSS optimization was easy; put all CSS in your head, aggregating everything in one CSS-file per media-type and you were good to go. But ever since Google included mobile in PageSpeed Insights and started complaining about render blocking CSS, things got messy (see "deferring CSS" elsewhere in this FAQ). One of the solutions is inlining all your CSS, which as of Autoptimize 1.8.0 is supported.
69 -
70 -Inlining all CSS has one clear advantage (better PageSpeed score) and one big disadvantage; your base HTML-page gets significantly bigger and if the amount of CSS is big, Pagespeed Insights will complain of "roundtrip times". Also when looking at a test that includes multiple requests (let's say 5 pages), performance will be worse, as the CSS-payload is sent over again and again whereas normally the separate CSS-files would not need to be sent any more as they would be in cache.
71 -
72 -So the choice should be based on your answer to some site-specific questions; how much CSS do you have? How many pages per visit do your visitors request? If you have a lot of CSS or a high number of pages/ visit, it's probably not a good idea to inline all CSS.
73 -
74 -You can find more information on this topic [in this blog post](http://blog.futtta.be/2014/02/13/should-you-inline-or-defer-blocking-css/).
75 -
76 73 = My cache is getting huge, doesn't Autoptimize purge the cache? =
77 74
78 75 Autoptimize does not have its proper cache purging mechanism, as this could remove optimized CSS/JS which is still referred to in other caches, which would break your site. Moreover a fast growing cache is an indication of [other problems you should avoid](http://blog.futtta.be/2016/09/15/autoptimize-cache-size-the-canary-in-the-coal-mine/).
79 76
@@ -83,12 +80,8 @@
83 80 * excluding JS-variables (or sometimes CSS-selectors) that change on a per page (or per pageload) basis. You can read how you can do that [in this blogpost](http://blog.futtta.be/2014/03/19/how-to-keep-autoptimizes-cache-size-under-control-and-improve-visitor-experience/).
84 81
85 82 Despite above objections, there are 3rd party solutions to automatically purge the AO cache, e.g. using [this code](https://wordpress.org/support/topic/contribution-autoptimize-cache-size-under-control-by-schedule-auto-cache-purge/) or [this plugin](https://wordpress.org/plugins/bi-clean-cache/), but for reasons above these are to be used only if you really know what you're doing.
86 83
87 -= Upon updating Autoptimize can't be reactivated =
88 -
89 -I have not been able to reproduce this, but had 2 users reporting that they had to temporarily disable W3 Total Cache to be able to re-activate the updated Autoptimize. No idea why this is happening, but this might help if you encounter that problem.
90 -
91 84 = "Clear cache" doesn't seem to work? =
92 85
93 86 When clicking the "Delete Cache" link in the Autoptimize dropdown in the admin toolbar, you might to get a "Your cache might not have been purged successfully". In that case go to Autoptimizes setting page and click the "Save changes & clear cache"-button.
94 87
@@ -93,8 +86,12 @@
93 86 When clicking the "Delete Cache" link in the Autoptimize dropdown in the admin toolbar, you might to get a "Your cache might not have been purged successfully". In that case go to Autoptimizes setting page and click the "Save changes & clear cache"-button.
94 87
95 88 Moreover don't worry if your cache never is down to 0 files/ 0KB, as Autoptimize (as from version 2.2) will automatically preload the cache immediately after it has been cleared to speed further minification significantly up.
96 89
90 += My site looks broken when I purge Autoptimize's cache! =
91 +
92 +When clearing AO's cache, no page cache should contain pages (HTML) that refers to the removed optimized CSS/ JS. Although for that purpose there is integration between Autoptimize and some page caches, this integration does not cover 100% of setups so you might need to purge your page cache manually.
93 +
97 94 = Can I still use Cloudflare's Rocket Loader? =
98 95
99 96 Cloudflare Rocket Loader is a pretty advanced but invasive way to make JavaScript non-render-blocking, which [Cloudflare still considers Beta](https://wordpress.org/support/topic/rocket-loader-breaking-onload-js-on-linked-css/#post-9263738). Sometimes Autoptimize & Rocket Loader work together, sometimes they don't. The best approach is to disable Rocket Loader, configure Autoptimize and re-enable Rocket Loader (if you think it can help) after that and test if everything still works.
100 97
@@ -101,22 +98,14 @@
101 98 At the moment (June 2017) it seems RocketLoader might break AO's "inline & defer CSS", which is based on [Filamentgroup’s loadCSS](https://github.com/filamentgroup/loadCSS), resulting in the deferred CSS not loading.
102 99
103 100 = I tried Autoptimize but my Google Pagespeed Scored barely improved =
104 101
105 -Autoptimize is not a simple "fix my Pagespeed-problems" plugin; it "only" aggregates & minifies (local) JS & CSS and allows for some nice extra's as removing Google Fonts and deferring the loading of the CSS. As such Autoptimize will allow you to improve your performance (load time measured in seconds) and will probably also help you tackle some specific Pagespeed warnings. If you want to improve further, you will probably also have to look into e.g. page caching, image optimization and your webserver configuration, which will improve real performance (again, load time as measured by e.g. https://webpagetest.org) and your "performance best practise" pagespeed ratings.
102 +Autoptimize is not a simple "fix my Pagespeed-problems" plugin; it "only" aggregates & minifies (local) JS & CSS and images and allows for some nice extra's as removing Google Fonts and deferring the loading of the CSS. As such Autoptimize will allow you to improve your performance (load time measured in seconds) and will probably also help you tackle some specific Pagespeed warnings. If you want to improve further, you will probably also have to look into e.g. page caching and your webserver configuration, which will improve real performance (again, load time as measured by e.g. https://webpagetest.org) and your "performance best practice" pagespeed ratings.
106 103
107 -= So should I aggregate inline CSS/ JS? =
108 -
109 -Before Autoptimize 2.0.0, inline code was always optimized with all CSS pushed in the head-section and all JS at the end with a defer-flag. This often caused 2 problems; the priority of inline CSS got lost and inline JS could contain page- or request-specific code which broke Autoptimize's caching mechanism leading to too many cached files and the minification running over and over. This is why as from AO 2.0 by default inline code is not optimized (except for those upgrading from previous versions). Additionally, to avoid inline JS breaking because jquery is not available, `js/jquery/jquery.js` is excluded by default.
110 -
111 104 = What can I do with the API? =
112 105
113 106 A whole lot; there are filters you can use to conditionally disable Autoptimize per request, to change the CSS- and JS-excludes, to change the limit for CSS background-images to be inlined in the CSS, to define what JS-files are moved behind the aggregated one, to change the defer-attribute on the aggregated JS script-tag, ... There are examples for some filters in autoptimize_helper.php_example and in this FAQ.
114 107
115 -= How can I use the code in autoptimize_helper.php_example? =
116 -
117 -Although you could add the code to your theme's functions.php, it would get overwritten with your next theme update. Therefor it is better to either create a helper plugin of your own or to simply use [the Code Snippets plugin](https://wordpress.org/plugins/code-snippets/) to manage any custom code.
118 -
119 108 = How does CDN work? =
120 109
121 110 Starting from version 1.7.0, CDN is activated upon entering the CDN blog root directory (e.g. http://cdn.example.net/wordpress/). If that URL is present, it will used for all Autoptimize-generated files (i.e. aggregated CSS and JS), including background-images in the CSS (when not using data-uri's).
122 111
@@ -125,9 +114,9 @@
125 114 = Why aren't my fonts put on the CDN as well? =
126 115
127 116 Autoptimize supports this, but it is not enabled by default because [non-local fonts might require some extra configuration](http://davidwalsh.name/cdn-fonts). But if you have your cross-origin request policy in order, you can tell Autoptimize to put your fonts on the CDN by hooking into the API, setting `autoptimize_filter_css_fonts_cdn` to `true` this way;
128 117
129 -`add_filter('autoptimize_filter_css_fonts_cdn',__return_true);`
118 +`add_filter( 'autoptimize_filter_css_fonts_cdn', '__return_true' );`
130 119
131 120 = I'm using Cloudflare, what should I enter as CDN root directory =
132 121
133 122 Nothing, when on Cloudflare your autoptimized CSS/ JS is on the Cloudflare's CDN automatically.
@@ -143,34 +132,29 @@
143 132 * if you want to exclude a specific file, e.g. wp-content/plugins/funkyplugin/css/style.css, you could simply exclude "funkyplugin/css/style.css"
144 133 * if you want to exclude all files of a specific plugin, e.g. wp-content/plugins/funkyplugin/js/*, you can exclude for example "funkyplugin/js/" or "plugins/funkyplugin"
145 134 * if you want to exclude inline code, you'll have to find a specific, unique string in that block of code and add that to the exclusion list. Example: to exclude `<script>funky_data='Won\'t you take me to, Funky Town'</script>`, the identifier is "funky_data".
146 135
147 -= Configuring & Troubleshooting Autoptimize =
136 += Troubleshooting Autoptimize =
148 137
149 -After having installed and activated the plugin, you'll have access to an admin page where you can to enable HTML, CSS and JavaScript optimization. According to your liking, you can start of just enabling all of them, or if you're more cautious one at a time.
138 +Have a look at the troubleshooitng instructions at https://blog.futtta.be/2022/05/05/what-to-do-when-autoptimize-breaks-your-site/
150 139
151 -If your blog doesn't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using "advanced settings":
140 += I excluded files but they are still being autoptimized? =
152 141
153 -* If all works but you notice your blog is slower, ensure you have a page caching plugin installed (WP Super Cache or similar) and check the info on cache size (the solution for that problem also impacts performance for uncached pages) in this FAQ as well.
154 -* In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. In this case you can turn on the option "Look for styles on just head?" and see if that solves the problem. You can also force CSS not to be aggregated by wrapping it in noptimize-tags in your theme or widget or by adding filename (for external stylesheets) or string (for inline styles) to the exclude-list.
155 -* In case some functionality on your site stops working (a carroussel, a menu, the search input, ...) you're likely hitting JavaScript optimization trouble. Change the "Aggregate inline JS" and/ or "Force JavaScript in head?" settings and try again. Excluding 'js/jquery/jquery.js' from optimization (see below) and optionally activating "[Add try/catch wrapping](http://blog.futtta.be/2014/08/18/when-should-you-trycatch-javascript/)") can also help. Alternatively -for the technically savvy- you can exclude specific scripts from being treated (moved and/ or aggregated) by Autoptimize by adding a string that will match the offending Javascript or excluding it from within your template files or widgets by wrapping the code between noptimize-tags. Identifying the offending JavaScript and choosing the correct exclusion-string can be trial and error, but in the majority of cases JavaScript optimization issues can be solved this way. When debugging JavaScript issues, your browsers error console is the most important tool to help you understand what is going on.
156 -* If your theme or plugin require jQuery, you can try either forcing all in head and/ or excluding jquery.js (and jQuery-plugins if needed).
157 -* If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
158 -* If you tried the troubleshooting tips above and you still can't get CSS and JS working at all, you can ask for support on the [WordPress Autoptimize support forum](http://wordpress.org/support/plugin/autoptimize). See below for a description of what information you should provide in your "trouble ticket"
142 +AO minifies excluded JS/ CSS if the filename indicates the file is not minified yet. As of AO 2.5 you can disable this on the "JS, CSS & HTML"-tab under misc. options by unticking "minify excluded files".
159 143
160 144 = Help, I have a blank page or an internal server error after enabling Autoptimize!! =
161 145
162 -First of all make sure you're not running other HTML, CSS or JS minification plugins (BWP minify, WP minify, ...) simultaneously with Autoptimize or disable that functionality your page caching plugin (W3 Total Cache, WP Fastest Cache, ...).
146 +Make sure you're not running other HTML, CSS or JS minification plugins (BWP minify, WP minify, ...) simultaneously with Autoptimize or disable that functionality your page caching plugin (W3 Total Cache, WP Fastest Cache, ...). Try enabling only CSS or only JS optimization to see which one causes the server error and follow the generic troubleshooting steps to find a workaround.
163 147
164 -In some rare cases the [CSS minification component](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/) currently used by Autoptimize crashes due to a lack of resources (see [detailed technical explanation here](http://blog.futtta.be/2014/01/14/irregular-expressions-have-your-stack-for-lunch/)). You can in that case either disable CSS optimization, try to exclude specific CSS from being aggregated or activate the legacy minifiers which don't have that problem. The latter can be accomplished by adding this to your wp-config.php:
148 += But I still have blank autoptimized CSS or JS-files! =
165 149
166 -`define("AUTOPTIMIZE_LEGACY_MINIFIERS","true");`
150 +If you are running Apache, the .htaccess file written by Autoptimize can in some cases conflict with the AllowOverrides settings of your Apache configuration (as is the case with the default configuration of some Ubuntu installations), which results in "internal server errors" on the autoptimize CSS- and JS-files. This can be solved by [setting AllowOverrides to All](http://httpd.apache.org/docs/2.4/mod/core.html#allowoverride).
167 151
168 -The "legacy minifiers" will remain in Autoptimize "for ever" and changes to wp-config.php are not affected by core-, theme- or plugin-upgrades so you should be good to go.
152 += Can't log in on domain mapped multisites =
169 153
170 -= But I still have blank autoptimized CSS or JS-files! =
154 +Domain mapped multisites require Autoptimize to be initialized at a different WordPress action, add this line of code to your wp-config.php to make it so to hook into `setup_theme` for example:
171 155
172 -If you are running Apache, the htaccess file written by Autoptimize can in some cases conflict with the AllowOverrides settings of your Apache configuration (as is the case with the default configuration of some Ubuntu installations), which results in "internal server errors" on the autoptimize CSS- and JS-files. This can be solved by [setting AllowOverrides to All](http://httpd.apache.org/docs/2.4/mod/core.html#allowoverride).
156 +`define( 'AUTOPTIMIZE_SETUP_INITHOOK', 'setup_theme' );`
173 157
174 158 = I get no error, but my pages are not optimized at all? =
175 159
176 160 Autoptimize does a number of checks before actually optimizing. When one of the following is true, your pages won't be optimized:
@@ -194,22 +178,14 @@
194 178 Disable the option to optimize cart/ checkout pages (works for WooCommerce, Easy Digital Downloads and WP eCommerce).
195 179
196 180 = Revolution Slider is broken! =
197 181
198 -Make sure `js/jquery/jquery.js` is in the comma-separated list of JS optimization exclusions (this is excluded in the default configuration).
182 +Make sure `js/jquery/jquery.min.js` is in the comma-separated list of JS optimization exclusions (this is excluded in the default configuration).
199 183
200 184 = I'm getting "jQuery is not defined" errors =
201 185
202 -In that case you have un-aggregated JavaScript that requires jQuery to be loaded, so you'll have to add `js/jquery/jquery.js` to the comma-separated list of JS optimization exclusions.
186 +In that case you have un-aggregated JavaScript that requires jQuery to be loaded, so you'll have to add `js/jquery/jquery.min.js` to the comma-separated list of JS optimization exclusions.
203 187
204 -= My Autoptimized CSS/ JS is broken after upgrading from 2.1 to 2.2! =
205 -
206 -One of the bigger changes in Autoptimize 2.2 it that it minifies first and aggregates second, which has important performance-benefits. Although this has been tested rather thoroughly, it is possible that this approach does not always work. You can turn this behavior off by hooking into Autoptimize's API, like this;
207 -
208 -`
209 -add_filter('autoptimize_filter_speedupper','__return_false');
210 -`
211 -
212 188 = I use NextGen Galleries and a lot of JS is not aggregated/ minified? =
213 189
214 190 NextGen Galleries does some nifty stuff to add JavaScript. In order for Autoptimize to be able to aggregate that, you can either disable Nextgen Gallery's resourced manage with this code snippet `add_filter( 'run_ngg_resource_manager', '__return_false' );` or you can tell Autoptimize to initialize earlier, by adding this to your wp-config.php: `define("AUTOPTIMIZE_INIT_EARLIER","true");`
215 191
@@ -215,361 +191,278 @@
215 191
216 192 = What is noptimize? =
217 193
218 194 Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
219 -`&lt;!--noptimize-->&lt;script>alert('this will not get autoptimized');&lt;/script>&lt;!--/noptimize-->`
195 +`&lt;!&#45;&#45;noptimize&#45;&#45;>&lt;script>alert('this will not get autoptimized');&lt;/script>&lt;!&#45;&#45;/noptimize&#45;&#45;>`
220 196
221 197 You can do this in your page/ post content, in widgets and in your theme files (consider creating [a child theme](http://codex.wordpress.org/Child_Themes) to avoid your work being overwritten by theme updates).
222 198
223 199 = Can I change the directory & filename of cached autoptimize files? =
224 200
225 -Yes, if you want to serve files from e.g. /wp-content/resources/aggregated_12345.css instead of the default /wp-content/cache/autoptimize/autoptimize_12345.css, then add this to wp-config.php:
201 +Yes, if you want to serve files from e.g. /wp-content/resources/aggregated_12345.css instead of the default /wp-content/cache/autoptimize/autoptimize_12345.css, then add this to wp-config.php:
226 202 `
227 203 define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/');
228 204 define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_');
229 205 `
230 206
207 += Does this work with non-default WP_CONTENT_URL ? =
208 +
209 +No, Autoptimize does not support a non-default WP_CONTENT_URL out-of-the-box, but this can be accomplished with a couple of lines of code hooking into Autoptimize's API.
210 +
231 211 = Can the generated JS/ CSS be pre-gzipped? =
232 212
233 213 Yes, but this is off by default. You can enable this by passing ´true´ to ´autoptimize_filter_cache_create_static_gzip´. You'll obviously still have to configure your webserver to use these files instead of the non-gzipped ones to avoid the overhead of on-the-fly compression.
234 214
235 -= Where can I get help? =
215 += What does "remove emojis" do? =
236 216
237 -You can get help on the [wordpress.org support forum](http://wordpress.org/support/plugin/autoptimize). If you are 100% sure this your problem cannot be solved using Autoptimize configuration and that you in fact discovered a bug in the code, you can [create an issue on GitHub](https://github.com/futtta/autoptimize/issues). If you're looking for premium support, check out our [Autoptimize Pro Support and Web Performance Optimization services](http://autoptimize.com/).
217 +This new option in Autoptimize 2.3 removes the inline CSS, inline JS and linked JS-file added by WordPress core. As such is can have a small positive impact on your site's performance.
238 218
239 -= I want out, how should I remove Autoptimize? =
219 += Is "remove query strings" useful? =
240 220
241 -* Disable the plugin (this will remove options and cache)
242 -* Remove the plugin
243 -* Clear any cache that might still have pages which reference Autoptimized CSS/JS (e.g. of a page caching plugin such as WP Super Cache)
221 +Although some online performance assessment tools will single out "query strings for static files" as an issue for performance, in general the impact of these is almost non-existant. As such Autoptimize, since version 2.3, allows you to have the query string (or more precisely the "ver"-parameter) removed, but ticking "remove query strings from static resources" will have little or no impact of on your site's performance as measured in (milli-)seconds.
244 222
245 -= How can I help/ contribute? =
223 += (How) should I optimize Google Fonts? =
246 224
247 -Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and code away!
225 +Google Fonts are typically loaded by a "render blocking" linked CSS-file. If you have a theme and plugins that use Google Fonts, you might end up with multiple such CSS-files. Autoptimize (since version 2.3) now let's you lessen the impact of Google Fonts by either removing them alltogether or by optimizing the way they are loaded. There are two optimization-flavors; the first one is "combine and link", which replaces all requests for Google Fonts into one request, which will still be render-blocking but will allow the fonts to be loaded immediately (meaning you won't see fonts change while the page is loading). The alternative is "combine and load async" which uses JavaScript to load the fonts in a non-render blocking manner but which might cause a "flash of unstyled text".
248 226
249 -== Changelog ==
227 += Should I use "preconnect" =
250 228
251 -= 2.2.2 =
252 -* roll-back to previous battle-tested version of the CSS minifier (a.o. fixing a bug where colors in filenames were replaced by hex-values)
253 -* tweaks to Autoptimize toolbar menu (visual + timeout of "delete cache" AJAX call)
254 -* readme update
229 +Preconnect is a somewhat advanced feature to instruct browsers ([if they support it](https://caniuse.com/#feat=link-rel-preconnect)) to make a connection to specific domains even if the connection is not immediately needed. This can be used e.g. to lessen the impact of 3rd party resources on HTTPS (as DNS-request, TCP-connection and SSL/TLS negotiation are executed early). Use with care, as preconnecting to too many domains can be counter-productive.
255 230
256 -= 2.2.1 =
257 -* fix for images being referenced in CSS not all being translated to correct path, leading to 404’s as reported by Jeff Inho
258 -* fix for "[] operator not supported for strings" error in PHP7.1 as reported by falk-wussow.de
259 -* fix for security hash busting AO's cache in some cases (esp. in 2.1.1)
231 += When can('t) I async JS? =
260 232
261 -= 2.2.0 =
262 -* new: Autoptimize minifies first (caching the individual snippets) and aggregrates the minified snippets, resulting in huge performance improvements for uncached JS/ CSS.
263 -* new: option to enable/ disable AO for logged in users (on by default)
264 -* new: option to enable/ disable AO on WooCommerce, Easy Digital Downloads or WP eCommerce cart/ checkout page (on by default)
265 -* improvement: switched to [rel=preload + Filamentgroup’s loadCSS for CSS deferring](http://blog.futtta.be/2017/02/24/autoptimize-css-defer-switching-to-loadcss-soon/)
266 -* improvement: switched to YUI CSS minifier PHP-port 2.8.4-p10 (so not to the 3.x branch yet)
267 -* improvements to the logic of which JS/ CSS can be optimized (getPath function) increasing reliability of the aggregation process
268 -* security: made placeholder replacement less naive to protect against XSS and LFI vulnerability as reported by Matthew Barry and fixed with great help from Matthew and Tomas Trkulja. Thanks guys!!
269 -* API: Lots of extra filters, making AO (even) more flexible.
270 -* Lots of bugfixes and smaller improvements (see [GitHub commit log](https://github.com/futtta/autoptimize/commits/master))
271 -* tested and confirmed working in WordPress 4.8
233 +JavaScript files that are not autoptimized (because they were excluded or because they are hosted elsewhere) are typically render-blocking. By adding them in the comma-separated "async JS" field, Autoptimize will add the async flag causing the browser to load those files asynchronously (i.e. non-render blocking). This can however break your site (page), e.g. if you async "js/jquery/jquery.min.js" you will very likely get "jQuery is not defined"-errors. Use with care.
272 234
273 -= 2.1.2 =
274 -* fix for security hash busting AO's cache in some cases (esp. in 2.1.1)
275 -* identical to 2.1.0 except for the security fix backported from 2.2.0
235 += How does image optimization work? =
276 236
277 -= 2.1.1 =
278 -* identical to 2.1.0 except for the security fix backported from 2.2.0
237 +When image optimization is on, Autoptimize will look for png, gif, jpeg (.jpg) files in image tags and in your CSS files that are loaded from your own domain and change the src (source) to the ShortPixel CDN for those. Important: this can only work for publicly available images, otherwise the image optimization proxy will not be able to get the image to optimize it, so firewalls or proxies or password protection or even hotlinking-prevention might break image optimization.
279 238
280 -= 2.1.0 =
281 -* new: Autoptimize now appears in admin-toolbar with an easy view on cache size and the possibility to purge the cache (pass `false` to `autoptimize_filter_toolbar_show` filter to disable), a big thanks to [Pablo Custo](https://github.com/pablocusto) for his hard work on this nice feature!
282 -* new: An extra "More Optimization"-tab is shown (can be hidden with ´autoptimize_filter_show_partner_tabs´-filter) with information about related optimization tools- and services.
283 -* new: If cache size becomes too big, a mail will be sent to the site admin (pass `false` to `autoptimize_filter_cachecheck_sendmail` filter to disable or pass alternative email to the `autoptimize_filter_cachecheck_mailto` filter to change email-address)
284 -* new: power-users can enable Autoptimize to pre-gzip the autoptimized files by passing `true` to `autoptimize_filter_cache_create_static_gzip`, kudo's to (Draikin)[https://github.com/Draikin] for this!
285 -* improvement: admin GUI updated (again; thanks Pablo!) with some responsiveness added in the mix (not showing the right hand column on smaller screen-sizes)
286 -* improvement: settings-screen now accepts protocol-relative URL for CDN base URL
287 -* improvement: new (smarter) defaults for JS (don't force in head + exclude jquery.js) and CSS optimization (include inline CSS)
288 -* Misc. bugfixes & small improvements (see [commit-log on GitHub](https://github.com/futtta/autoptimize/commits/master))
289 -* Minimal version updated from 2.7 (!) to 4.0
290 -* Tested and confirmed working on WordPress 4.6
239 += Can I use image optimization for my intranet/ protected site? =
291 240
292 -= 2.0.2 =
293 -* bugfix: disallow moving non-aggregated JS by default (can be re-enabled by passing false to the `autoptimize_filter_js_unmovable`)
294 -* bugfix: hook autoptimize_action_cachepurged into init to avoid ugly error-message for ZenCache (Comet Cache) users
295 -* bugfix to allow for Autoptimize to work with PHP 5.2 (although [you really should upgrade](http://blog.futtta.be/2016/03/15/why-would-you-still-be-on-php-5-2/))
241 +No; Image optimization depends on the ability of the external image optimization service to fetch the original image from your site, optimize it and save it on the CDN. If you images cannot be downloaded by anonymous visitors (due to firewall/ proxy/ password protection/ hotlinking-protection), image optimization will not work.
296 242
297 -= 2.0.1 =
298 -* Improvement: Autoptimize now also tries to purge WP Engine cache when AO's cache is cleared
299 -* Improvement: for AMP pages (which are pretty optimized anyway) Autoptimize will not optimize to avoid issues with e.g. "inline & defer" and with AO adding attributes to link-tags that are not allowed in the subset of HTML that AMP is
300 -* Improvement: refactored the page cache purging mechanism (removing duplicate code, now nicely hooking into AO's own `autoptimize_action_cachepurged` action)
301 -* Improvement: Re-enable functionality to move non-aggregated JS if "also aggregate inline JS" is active (can be disabled with `autoptimize_filter_js_unmovable` filter)
302 -* Improvement: script tags with `data-noptimize` attribute will be excluded from optimization
303 -* Bugfix: Better support for renamed wp-content directories
304 -* Bugfix: Multiple fixes for late-injected CSS/ JS (changes in those files were not always picked up, fonts or background images were not being CDN'ed, ...)
305 -* Misc. other fixes & improvements, go read [the commit-log on GitHub](https://github.com/futtta/autoptimize/commits/master) if you're that curious
306 -* Tested & confirmed working with WordPress 4.5 (beta 3)
243 += Where can I get more info on image optimization? =
307 244
308 -= 2.0.0 =
309 -* On average 30% faster minification (more info [in this blogpost](http://blog.futtta.be/2015/12/22/making-autoptimize-faster/))!
310 -* New: Option to (de-)activate aggregation of inline JS and CSS.
311 -* New: Option to remove Google Fonts.
312 -* New: Cache-size will be checked daily and a notice will be shown on wp-admin if cache size goes over 512 MB (can be changed by filter).
313 -* New: Small autoptimized CSS (less then 256 characters, can be changed by filter) will be inlined instead of linked.
314 -* New in API: filters to declare a JS and CSS whitelist, where only files in that whitelist are autoptimized and all others are left untouched.
315 -* New in API: filters to declare removable CSS and JS, upon which Autoptimize will simply delete that code (emoji CSS/JS for example, if you prefer not to dequeue them).
316 -* New in API: filter to move fonts to CDN as well.
317 -* lots of small and bigger bugfixes, I won't bother you with a full list but have a look at [the commmit log on GitHub](https://github.com/futtta/autoptimize/commits/master).
318 -* tested and confirmed working with PHP7
245 +Have a look at [Shortpixel's FAQ](https://shortpixel.helpscoutdocs.com/category/60-shortpixel-ai-cdn).
319 246
320 -= 1.9.4 =
321 -* bugfix: make sure non-AO CSSmin doesn't get fed 2 parameters (as some only expect one, which resulted in an internal server error), based on [feedback from zerooverture and zamba](https://wordpress.org/support/topic/error-code-500internal-server-error?replies=7)
322 -* bugfix: make default add_action hook back into "template_redirect" instead of "init" to fix multiple problems as reported by [schecteracademicservices, bond138, rickenbacker](https://wordpress.org/support/topic/192-concatenated-js-but-193-does-not-for-me?replies=11), [Rick Sportel](https://wordpress.org/support/topic/version-193-made-plugin-wp-cdn-rewrite-crash?replies=3#post-6833159) and [wizray](https://wordpress.org/support/topic/the-page-loads-both-the-auto-combined-css-file-and-origin-raw-file?replies=11#post-6833146). If you do need Autoptimize to initialize earlier (e.g. when using Nextgen Galleries), then add this to your wp-config.php:
323 -`define("AUTOPTIMIZE_INIT_EARLIER","true");`
247 += Can I disable AO listening to page cache purges? =
324 248
325 -= 1.9.3 =
326 -* improvement: more intelligent CDN-replacement logic, thanks [Squazz for reporting and testing](https://wordpress.org/support/topic/enable-cdn-for-images-referenced-in-the-css?replies=9)
327 -* improvement: allow strings (comments) to be excluded from HTML-optimization (comment removal)
328 -* improvement: changed priority with which AO gets triggered by WordPress, solving JS not being aggregated when NextGen Galleries is active, with great [help from msebald](https://wordpress.org/support/topic/js-options-dont-work-if-html-disabled/)
329 -* improvement: extra JS exclude-strings: gist.github.com, text/html, text/template, wp-slimstat.min.js, _stq, nonce, post_id (the latter two were removed from the "manual" exclude list on the settings-page)
330 -* new in API: autoptimize_filter_html_exclude, autoptimize_filter_css_defer, autoptimize_filter_css_inline, autoptimize_filter_base_replace_cdn, autopitmize_filter_js_noptimize, autopitmize_filter_css_noptimize, autopitmize_filter_html_noptimize
331 -* bugfix: remove some PHP notices, as [reported by dimitrov.adrian](https://wordpress.org/support/topic/php-errors-39)
332 -* bugfix: make sure HTML-optimalization does not gobble a space before a cite [as proposed by ecdltf](https://wordpress.org/support/topic/%E2%80%9Coptimize-html%E2%80%9D-is-gobbling-whitespace-before-cite-tag)
333 -* bugfix: cleaning the cache did not work on non-default directories as [encountered by NoahJ Champion](https://wordpress.org/support/topic/changing-the-wp-content-path-to-top-level?replies=10#post-6573657)
334 -* upgraded to [yui compressor php port 2.4.8-4](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port)
335 -* added arabic translation, thanks to the [ekleel team](http://www.ekleel.net)
336 -* tested with WordPress 4.2 beta 3
249 +As from AO 2.4 AO "listens" to page cache purges to clear its own cache. You can disable this behavior with this filter;
337 250
338 -= 1.9.2 =
339 -First of all; Happy holidays, all the best for 2015!!
251 +`
252 +add_filter('autoptimize_filter_main_hookpagecachepurge','__return_false');`
340 253
341 -* New: support for alternative cache-directory and file-prefix as requested by a.o. [Jassi Bacha](https://wordpress.org/support/topic/requesthelp-add-ability-to-specify-cache-folder?replies=1#post-6300128), [Cluster666](https://wordpress.org/support/topic/rewrite-js-path?replies=6#post-6363535) and Baris Unver.
342 -* Improvement: hard-exclude all linked-data json objects (script type=application/ld+json)
343 -* Improvement: several filters added to the API, e.g. to alter optimized HTML, CSS or JS
344 -* Bugfix: set Autoptimize priority back from 11 to 2 (as previously) to avoid some pages not being optimized (thanks to [CaveatLector for investigating & reporting](https://wordpress.org/support/topic/wp-property-plugin-add_action-priority-incompatibility?replies=1))
345 -* Bugfix (in YUI-CSS-compressor-PHP-port): don't convert bools to percentages in rotate3D-transforms (cfr. [bugreport on Github](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/issues/17))
346 -* Bugfix: background images with a space in the path didn't load, [reported by johnh10](https://wordpress.org/support/topic/optimize-css-code-error-with-background-image-elements?replies=6#post-6201582).
347 -* Bugfix: SVG image with fill:url broken after CSS optimization as [reported by Tkama](https://wordpress.org/support/topic/one-more-broblem-with-plugin?replies=2)
348 -* Updated translation for Swedish, new translation for Ukrainian by [Zanatoly of SebWeo.com](http://SebWeo.com)
349 -* Updated readme.txt
350 -* Confirmed working with WordPress 4.1
254 += Some of the non-ASCII characters get lost after optimization =
351 255
352 -= 1.9.1 =
353 -* hard-exclude [the sidelink-search-box introduced in WP SEO v1.6](http://wordpress.org/plugins/wordpress-seo/changelog/) from JS optimization (this [broke some JS-optimization badly](http://wordpress.org/support/topic/190-breaks-js?replies=4))
354 -* bugfix: first add semi-colon to inline script, only then add try-catch if required instead of the other way around.
256 +By default AO uses non multibyte-safe string methods, but if your PHP has the mbstring extension you can enable multibyte-safe string functions with this filter;
355 257
356 -= 1.9.0 =
357 -* "Inline and defer CSS" allows one to specify which "above the fold CSS" should be inlined, while the normal optimized CSS is deferred.
358 -* Inlined Base64-encoded background Images will now be cached as well and the threshold for inlining these images has been bumped up to 4096 bytes (from 2560).
359 -* Separate cache-directories for CSS and JS in /wp-content/cache/autoptimize, which should result in faster cache pruning (and in some cases possibly faster serving of individual aggregated files).
360 -* Autoptimized CSS is now injected before the <title>-tag, JS before </body> (and after </title> when forced in head). This can be overridden in the API.
361 -* Some usability improvements of the administration-page
362 -* Multiple hooks added to the API a.o. filters to not aggregate inline CSS or JS and filters to aggregate but not minify CSS or JS.
363 -* Updated translations for Dutch, French, German, Persian and Polish and new translations for Brazilian Portuguese (thanks to [Leonardo Antonioli](http://tobeguarany.com/)) and Turkish (kudo's [Baris Unver](http://beyn.org/))
364 -* Multiple bugfixes & improvements
365 -* Tested with WordPress 4.0 rc3
258 +`
259 +add_filter('autoptimize_filter_main_use_mbstring', '__return_true');`
366 260
367 -= 1.8.5 =
368 -* Updated to lastest version of [CSS minification component](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/)
369 -* Improvement: for multi-sites the cache is now written to separate directories, avoiding one site to clean out the cache for the entire installation. Code [contributed by Joern Lund](http://wordpress.org/support/topic/multisite-blog-admin-can-delete-entire-network-cache), kudo's Joern!!
370 -* Improvement: add WordPress plugin header to autoptimize_helper.php_example to make it easier to enable it as a module
371 -* Improvement: nonce and post_id are added to default configuration for JS exclusion
372 -* Improvement: explicitely exclude wp-admin from being Autoptimized
373 -* Bugfix: plupload.min.js, syntaxhighlighter and "adsbygoogle" are excluded from JS aggregation.
374 -* Bugfix: avoid double closing body-tags when Autoptimize adds JS to HTML as [reported by Can](http://wordpress.org/support/topic/works-like-a-charm-but-i-have-two-problems)
375 -* Bugfix: make .htaccess compatible with both Apache 2.2 and 2.4 (http://wordpress.org/support/topic/feature-request-support-generating-htaccess-files-for-apache-24?replies=3)
261 += I can't get Critical CSS working =
376 262
377 -= 1.8.4 =
378 -* Bugfix: code in inline JS (or CSS) can be wrapped inside HTML-comments, but these got removed since 1.8.2 as part of a bugfix.
263 +Check [the FAQ on the (legacy) "power-up" here](https://wordpress.org/plugins/autoptimize-criticalcss/#faq), this info will be integrated in this FAQ at a later date.
379 264
380 -= 1.8.3 =
381 -* Bugfix: avoid useless warnings on is_callable to flood php error log as [reported by Praveen Kumar](http://wordpress.org/support/topic/182-breaks-css-and-js?replies=14#post-5377604)
265 += Do I still need the Critical CSS power-up when I have Autoptimize 2.7 or higher? =
382 266
383 -= 1.8.2 =
384 -* Improvement: more graceful failure when minifier classes exist but method does not, based on [bug-report by Franck160](http://wordpress.org/support/topic/confict-with-dynamic-to-top)
385 -* Improvement: deferred CSS is also outputted in noscript-tags
386 -* Improvement: differentiate between Apache version in .htaccess file as suggested by [iMadalin](http://www.imadalin.ro/)
387 -* Improvement: also aggregate protocol-less CSS/JS URI's (as [suggested by Ross](http://wordpress.org/support/topic/protocol-less-url-support))
388 -* Improvement: disable autoptimization based on parameter in querystring (for debugging)
389 -* Bugfix: some CSS-imports were not being aggregated/ minified
390 -* Bugfix: add CSS before <title instead of <title> to avoid breakage when title includes other attributes (e.g. itemscope)
391 -* Bugfix: make sure javascript or css between comments is not aggregated as reported by [Milap Gajjar](http://wordpress.org/support/topic/the-optimized-css-contains-duplicate-classes)
392 -* Tested with WordPress 3.9 (beta 1)
393 -* Updates in FAQ
267 +No, the Critical CSS power-up is not needed any more, all functionality (and many fixes/ improvements) are now part of Autoptimize.
394 268
395 -= 1.8.1 =
396 -* bugfix: CSS in conditional comments was not excluded from aggregation as reported by [Rolf](http://www.finkbeiner-holz.de/) and [bottapress](http://www.wordpress-hebergement.fr/)
269 += What does "enable 404 fallbacks" do? Why would I need this? =
397 270
398 -= 1.8.0 =
399 -* New: Option to inline all CSS [as suggested by Hamed](http://wordpress.org/support/topic/make-style-sheet-inline)
400 -* New: set of filters to provide a simple API to change Autoptimize behavior (e.g. replace "defer" with "async", disabling Autoptimization on certain pages, specificy non-aggregatable script to be moved after aggregated one (cfr. http://wordpress.org/support/topic/feature-request-some-extra-options?replies=14), size of image to be data-urized). More info in the included autoptimize_helper.php_example.
401 -* Improvement: exclude (css in) noscript-tags as [proposed by belg4mit](http://wordpress.org/support/topic/feature-suggestion-noscript-for-css)
402 -* Improvement: switch default delivery of optimized CSS/JS-files from PHP to static files
403 -* Updated [upstream CSS minifier](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port/commit/fb33d2ffd0963692747101330b175a80173ce21b)
404 -* Improvement (force gzip of static files) and Bugfix (force expiry for dynamic files, thanks to [Willem Razenberg](http://www.column-razenberg.nl/) in .htaccess
405 -* Improvement: fail gracefully when things go wrong (e.g. CSS import resulting in empty aggregated CSS-files [reported by Danka](http://wordpress.org/support/topic/very-good-332) or when the theme is broken [as seen by Prateek Gupta](http://wordpress.org/support/topic/js-optimization-break-site-white-page-issue?replies=14#post-5038941))
406 -* Updated translations and Polish added (thanks to [Jakub Sierpinski](http://www.sierpinski.pl/)).
407 -* Bugfix: stop import-statements in CSS comments to be taken into acccount [hat tip to Josef from blog-it-solutions.de](http://www.blog-it-solutions.de/)
408 -* Bugfix: fix for blur in CSS breakeage as [reported by Chris of clickpanic.com](http://blog.clickpanic.com/)
271 +Autoptimize caches aggregated & optimized CSS/ JS and links to those cached files are stored in the HTML, which will be stored in a page cache (which can be a plugin, can be at host level, can be at 3rd party, in the Google cache, in a browser). If there is HTML in a page cache that links to Autoptimized CSS/ JS that has been removed in the mean time (when the cache was cleared) then the page from cache will not look/ work as expected as the CSS or JS were not found (a 404 error).
409 272
410 -= 1.7.3 =
411 -* improvement: remove cache + options on uninstall as [requested by Gingerbreadmen](http://wordpress.org/support/topic/wp_options-entries)
412 -* improvement: set .htaccess to allow PHP execution in wp-content/cache/autoptimize when saving optimized files as PHP, as suggested by (David Mottershead of bermuda4u.com)[http://www.bermuda4u.com/] but forbid PHP execution when saving aggregated script/css as static files (except for multisite).
413 -* bugfix: avoid Yoast SEO sitemaps going blank (due optimization of Yoast's dynamically built XML/XSL) as reported by [Vance Hallman](http://www.icefishing.co) and [Armand Hadife](http://solar-flag-pole-lights.com/). More info on this issue [can be found on my blog](http://blog.futtta.be/2013/12/09/blank-yoast-seo-sitemaps-no-more/).
414 -* smaller changes to readme.txt
273 +This setting aims to prevent things from breaking by serving "fallback" CSS or JS. The fallback-files are copies of the first Autoptimized CSS & JS files created after the cache was emptied and as such will based on the homepage. This means that the CSS/ JS migth not apply 100% on other pages, but at least the impact of missing CSS/ JS will be lessened (often significantly).
415 274
416 -= 1.7.2 =
417 -* improvement: extra checks in CSS @import-handling + move import rules to top of CSS if not imported successfully, based a.o. on bug reports [by ozum](http://wordpress.org/support/topic/zero-lenght-file-with-css-optimization) and by [Peter Stolwijk](http://wordpress.org/support/topic/cant-activate-plugin-22?replies=13#post-4891377)
418 -* improvement: check if JS and CSS minifier classes exist and only load if they don't to avoid possible conflicts with other themes or plugins that already loaded minifiers
419 -* tested and approved for WordPress 3.8 (beta1)
275 +When the option is enabled, Autoptimize adds an `ErrorDocument 404` to the .htaccess (as used by Apache) and will also hook into WordPress core `template_redirect` to capture 404's handled by Wordpress. When using NGINX something like below should work (I'm not an NGINX specialist, but it does work for me);
420 276
421 -= 1.7.1 =
422 -* New: support for mapped domains as suggested by [Michael for tiremoni.com](http://tiremoni.com/)
423 -* Added an .htaccess to wp-content/cache/autoptimize to overwrite other caching directives (fixing a problem with WP Super Cache's .htaccess really, [as reported](http://wordpress.org/support/topic/expiresmax-age-compatibility-with-supercache) by [Hugh of www.unitedworldschools.org](http://www.unitedworldschools.org/))
424 -* bugfix: Autoptimize broke data:uri's in CSS in some cases as reported by [Josef from blog-it-solutions.de](http://www.blog-it-solutions.de/)
425 -* bugfix: avoid PHP notice if CSS exclusion list is empty
426 -* moved "do not donate"-image into plugin
277 +`
278 +location ~* /wp-content/cache/autoptimize/.*\.(js|css)$ {
279 + try_files $uri $uri/ /wp-content/autoptimize_404_handler.php;
280 +}`
427 281
428 -= 1.7.0 =
429 -* New: exclude CSS
430 -* New: defer CSS
431 -* Updated minimizing components (JSMin & YUI PHP CSSMin)
432 -* Updated admin-page, hiding advanced configuration options
433 -* Updated CDN-support for added simplicity (code & UI-wise), including changing background image url in CSS
434 -* Updated/ new translations provided for [French: wordpress-hebergement.fr](http://www.wordpress-hebergement.fr/), [Persian: Hamed Irani](http://basics.ir/), [Swedish: Jonathan Sulo](http://sulo.se/), [German: blog-it-solutions.de](http://www.blog-it-solutions.de/) and Dutch
435 -* Removed support for YUI
436 -* Flush HTML caching plugin's cache when flushing Autoptimize's one
437 -* fix for BOM marker in CSS-files [as seen in Frontier theme](http://wordpress.org/support/topic/sidebar-problem-42), kudo's to [Download Converter](http://convertertoolz.com/) for reporting!
438 -* fix for [protocol-less 3rd party scripts disappearing](http://wordpress.org/support/topic/javascript-optimize-breaks-twentythirteen-mobile-menu), thanks for reporting p33t3r!
439 -* fix for stylesheets without type="text/css" not being autoptimized as reported by [renzo](http://cocobeanproductions.com/)
440 -* tested with WordPress 3.7 beta2 (admin-bar.min.js added to automatically excluded scripts)
282 +And this a nice alternative approach (provided by fboylovesyou);
441 283
442 -= 1.6.6 =
443 -* New: disable autoptimizatoin by putting part of your HTML, JS or CSS in between noptimize-tags, e.g.;
444 -`<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->`
445 -* Added extra check to prevent plugin-files being called outside of WordPress as suggested in [this good article on security](http://mikejolley.com/2013/08/keeping-your-shit-secure-whilst-developing-for-wordpress/).
446 -* Added small notice to be displayed after installation/ activation to ask user to configure the plugin as well.
447 -* Added Persian translation, thanks to [Hamed T.](http://basics.ir/)
284 +`location ~* /wp-content/cache/autoptimize/.*\.(css)$ {
285 + try_files $uri $uri/ /wp-content/cache/autoptimize/css/autoptimize_fallback.css;
286 +}
287 +location ~* /wp-content/cache/autoptimize/.*\.(js)$ {
288 + try_files $uri $uri/ /wp-content/cache/autoptimize/js/autoptimize_fallback.js;
289 +}`
448 290
449 -= 1.6.5 =
450 -* new javascript-debug option to force the aggregated javascript file in the head-section of the HTML instead of at the bottom
451 -* YUI compression & CDN are now deprecated functionality that will be removed in 1.7.0
291 += What open source software/ projects are used in Autoptimize? =
452 292
453 -= 1.6.4 =
454 -* fix for PHP notice about mfunc_functions
455 -* fix for strpos warnings due to empty values from the "Exclude scripts from autoptimize" configuration as [reported by CandleFOREX](http://wordpress.org/support/topic/empty-needle-warning)
456 -* fix for broken feeds as [reported by Dinata and talgalili](http://wordpress.org/support/topic/feed-issue-5)
293 +The following great open source projects are used in Autoptimize in some form or another:
457 294
458 -= 1.6.3 =
459 -* fix for IE-hacks with javascript inside, causing javascript breakage (as seen in Sampression theme) as reported by [Takahiro of hiskip.com](http://www.hiskip.com/wp/)
460 -* fix for escaping problem of imported css causing css breakage (as seen in Sampression theme) as reported by Takahiro as well
461 -* fix to parse imports with syntax @import 'custom.css' not being parsed (as seen in Arras theme), again as reported by Takahiro
462 -* fix for complex media types in media-attribute [as reported by jvwisssen](http://wordpress.org/support/topic/autoptimize-and-media-queries)
463 -* fix for disappearing background-images that were already datauri's [as reported by will.blaschko](http://wordpress.org/support/topic/data-uris)
464 -* fix not to strip out comments in HTML needed by WP Super Cache or W3 Total Cache (e.g. mfunc)
465 -* added check to clean cache on upgrade
466 -* updated FAQ in readme with information on troubleshooting and support
467 -* tested with WordPress 3.6 beta
295 +* [Mr Clay's Minify](https://github.com/mrclay/minify/) for JS & HTML minification
296 +* [YUI CSS compressor PHP Port](https://github.com/tubalmartin/YUI-CSS-compressor-PHP-port) for CSS minification
297 +* [Lazysizes](https://github.com/aFarkas/lazysizes) for lazyload
298 +* [Persist Admin Notices Dismissal](https://github.com/w3guy/persist-admin-notices-dismissal) for notices in the administration screens
299 +* [Plugin Update Checker](https://github.com/YahnisElsts/plugin-update-checker/) for automated updates from Github for the beta version
300 +* [LoadCSS](https://github.com/filamentgroup/loadCSS) for deferring full CSS
301 +* [jQuery cookie](https://github.com/carhartl/jquery-cookie) to store the "futtta about" category selection in a cookie
302 +* [jQuery tablesorter](https://github.com/christianbach/tablesorter) for the critical CSS rules/ jobs display
303 +* [jQuery unslider](https://github.com/idiot/unslider/) for the mini-slider in the top right corner on the main settings page (repo gone)
304 +* [JavaScript-md5](https://github.com/blueimp/JavaScript-MD5) for critical CSS rules editing
305 +* [Speed Booster Pack](https://wordpress.org/plugins/speed-booster-pack/) for advanced JS deferring
306 +* [Disable Remove Google Fonts](https://wordpress.org/plugins/disable-remove-google-fonts/) for additional Google Font removal
468 307
469 -= 1.6.2 =
470 -* Yet another emergency bugfix I'm afraid: apache_request_headers (again in config/delayed.php) is only available on ... Apache (duh), breaking non-Apache systems such as ngnix, Lighttpd and MS IIS badly. Reported by multiple users, thanks all!
308 += Where can I get help? =
471 309
472 -= 1.6.1 =
473 -* fixed stupid typo in config/delayed.php which broke things badly (april fools-wise); strpos instead of str_pos as reported by Takahiro.
310 +You can get help on the [wordpress.org support forum](http://wordpress.org/support/plugin/autoptimize). If you are 100% sure this your problem cannot be solved using Autoptimize configuration and that you in fact discovered a bug in the code, you can [create an issue on GitHub](https://github.com/futtta/autoptimize/issues). If you're looking for premium support, check out our [Autoptimize Pro Support and Web Performance Optimization services](http://autoptimize.com/).
474 311
475 -= 1.6.0 =
476 -* You can now specify scripts that should not be Autoptimized in the admin page. Just add the names (or part of the path) of the scripts in a comma-separated list and that JavaScript-file will remain untouched by Autoptimize.
477 -* Added support for ETag and LastModified (essentially for a better pagespeed score, as the files are explicitely cacheable for 1 year)
478 -* Autoptimizing for logged in users is enabled again
479 -* Autoptimize now creates an index.html in wp-content/cache/autoptimize to prevent snooping (as [proposed by Chris](http://blog.futtta.be/2013/01/07/adopting-an-oss-orphan-autoptimize/#li-comment-36292))
480 -* bugfix: removed all deprecated functions ([reported by Hypolythe](http://wordpress.org/support/topic/many-deprecated-errors) and diff by Heiko Adams, thanks guys!)
481 -* bugfix for HTTPS-problem as [reported by dbs121](http://wordpress.org/support/topic/woocommerce-autoptimizer-https-issue)
482 -* bugfix for breakage with unusual WordPress directory layout as reported by [Josef from blog-it-solutions.de](http://www.blog-it-solutions.de/).
312 += I want out, how should I remove Autoptimize? =
483 313
484 -= 1.5.1 =
485 -* bugfix: add CSS before opening title-tag instead of after closing title, to avoid CSS being loaded in wrong order, as reported by [fotofashion](http://fotoandfashion.de/) and [blogitsolutions](http://www.blog-it-solutions.de) (thanks guys)
314 +* Disable the plugin (this will remove options and cache)
315 +* Remove the plugin
316 +* Clear any cache that might still have pages which reference Autoptimized CSS/JS (e.g. of a page caching plugin such as WP Super Cache)
486 317
487 -= 1.5 =
488 -* first bugfix release by [futtta](http://blog.futtta.be/2013/01/07/adopting-an-oss-orphan-autoptimize/), thanks for a great plugin Turl!
489 -* misc bug fixes, a.o. support for Twenty Twelve theme, admin bar problem in WP3.5, data-uri breaking CSS file naming
318 += How can I help/ contribute? =
490 319
491 -= 1.4 =
492 -* Add support for inline style tags with CSS media
493 -* Fix Wordpress top bar
320 +Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and code away!
494 321
495 -= 1.3 =
496 -* Add workaround for TinyMCEComments
497 -* Add workaround for asynchronous Google Analytics
322 +== Changelog ==
498 323
499 -= 1.2 =
500 -* Add workaround for Chitika ads.
501 -* Add workaround for LinkWithin widget.
502 -* Belorussian translation
324 += 3.1.16 =
325 +* Security: overall hardening of Autoptimize, e.g. replacing some regular expressions with a more modern, safer approach.
326 +* CSS minification: fixes for problems with alpha channel of rgb()/hsl() colors (thanks to @hinnerk-a)
327 +* Critical CSS: improvements to job queueing and settings page tweaks
328 +* confrimed OK with WordPress 7.1
503 329
504 -= 1.1 =
505 -* Add workarounds for amazon and fastclick
506 -* Add workaround for Comment Form Quicktags
507 -* Fix issue with Vipers Video Quicktags
508 -* Fix a bug in where some scripts that shouldn't be moved were moved
509 -* Fix a bug in where the config page wouldn't appear
510 -* Fix @import handling
511 -* Implement an option to disable js/css gzipping
512 -* Implement CDN functionality
513 -* Implement data: URI generation for images
514 -* Support YUI CSS/JS Compressor
515 -* Performance increases
516 -* Handle WP Super Cache's cache files better
517 -* Update translations
330 += 3.1.15.1 =
331 +* fix for "Uncaught Error: Using $this when not in object context" when preloads are set
518 332
519 -= 1.0 =
520 -* Add workaround for whos.among.us
521 -* Support preserving HTML Comments.
522 -* Implement "delayed cache compression"
523 -* French translation
524 -* Update Spanish translation
333 += 3.1.15 =
334 +* also add fetchpriority=high to preload set on Extra tab
335 +* improve exit survey display in RTL languages
336 +* security enhancements for 2 authenticated stored XSS issues responsibly reported by stealhcopter and bashu
337 +* multiple minor changes/ improvements/ bugfixes, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
525 338
526 -= 0.9 =
527 -* Add workaround for networkedblogs.
528 -* Add workarounds for histats and statscounter
529 -* Add workaround for smowtion and infolinks.
530 -* Add workaround for Featured Content Gallery
531 -* Simplified Chinese translation
532 -* Update Spanish Translation
533 -* Modify the cache system so it uses wp-content/cache/
534 -* Add a clear cache button
339 += 3.1.14 =
340 +* improve HTML output for <link rel="preload" images (based on report by Muhammad)
341 +* let the 404-handler issue a 302 iso 301 HTTP response (as mentioned by thefitrv)
342 +* small improvement in critical CSS cron job handling in case of an empty "time limit" (thanks for the help Jason)
343 +* fix bug in "domain binding" in critical CSS advanced options (reported by Hazel)
344 +* catch and report (exceptional) JS optimization issues causing preg_replace_callback to crash out (in case of a huge amount of JS code), thanks siliconforks
345 +* confirmed OK with WordPress 6.9
535 346
536 -= 0.8 =
537 -* Add workaround for Vipers Video Quicktags
538 -* Support <link> tags without media.
539 -* Take even more precautions so we don't break urls in CSS
540 -* Support adding try-catch wrappings to JavaScript code
541 -* Add workaround for Wordpress.com Stats
542 -* Fix a bug in where the tags wouldn't move
543 -* Update translation template
544 -* Update Spanish translation
347 += 3.1.13 =
348 +* multiple minor changes/ improvements/ bugfixes, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
545 349
546 -= 0.7 =
547 -* Add fix for DISQUS Comment System.
350 += 3.1.12 =
351 +* image optimization: improvements to the favicon regex
352 +* javascript optimization: integrate most recent version of jsmin.php
353 +* critical CSS: improve blocklist (url/ paths that should not be added to the job queue)
354 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
548 355
549 -= 0.6 =
550 -* Add workaround for mybloglog, blogcatalog, tweetmeme and Google CSE
356 += 3.1.11 =
357 +* code quality improvements see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
358 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
551 359
552 -= 0.5 =
553 -* Support localization
554 -* Fix the move and don't move system (again)
555 -* Improve url detection in CSS
556 -* Support looking for scripts and styles on just the header
557 -* Fix an issue with data: uris getting modified
558 -* Spanish translation
360 += 3.1.10 =
361 +* improvement: with "don't aggregate but defer" and "also defer inline JS" on, also defer JS that had the async flag to avoid the (previously) asynced JS from executing before the inline JS has ran.
362 +* improvement: show option to disable the default on "compatibility logic".
363 +* fix for regression in 3.1.9 which caused JetPack Image optimization not working even if image optimization was off in AO.
364 +* API: some extra hooks in critical CSS to enable others (and AOPro) to act on changes in critical CSS rules
365 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
559 366
560 -= 0.4 =
561 -* Write plugin description in English
562 -* Set default config to everything off
563 -* Add link from plugins page to options page
564 -* Fix problems with scripts that shouldn't be moved and were moved all the same
367 += 3.1.9 =
368 +* improvement: activate JS, CSS & HTML optimization upon plugin activation (hat tip to Adam Silverstein (developer relations engineer at Google))
369 +* improvement: also defer asynced JS (to ensure execution order remains intact; asynced JS should not execute before deferred inline JS which it might depend upon)
370 +* improvement: exclude images from being lazyloaded if they have fetchpriority attribute set to high (as done by WordPress core since 6.3)
371 +* bugfix: disable spellcheck on CSS textarea's (above the fold CSS/ critical CSS) which in some cases caused browser issues
372 +* add tab to explain Autoptimize Pro.
373 +* confirmed working with WordPress 6.4 (beta 3)
374 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
565 375
566 -= 0.3 =
567 -* Disable CSS media on @imports - caused an infinite loop
376 += 3.1.8.1 =
377 +* urgent fix for PHP error, sorry about that!
568 378
569 -= 0.2 =
570 -* Support CSS media
571 -* Fix an issue in the IE Hacks preservation mechanism
572 -* Fix an issue with some urls getting broken in CSS
379 += 3.1.8 =
380 +* Images: improve optmization logic for background images
381 +* Critical CSS: don't trigger custom_post rule if not is_singular + adding debug logging for rule selection
382 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
573 383
574 -= 0.1 =
575 -* First released version.
384 += 3.1.7 =
385 +* security: improve validation (import) and sanitization (output) of critical CSS rules, to fix a medium severity Admin+ Stored Cross-Site Scripting vulnerability as reported by WP Scan Security.
386 +
387 += 3.1.6 =
388 +* CSS: removing trailing slashes in <link tags for more W3 HTML validation love
389 +* Extra: also dequeue WooCommerce block CSS if "remove WordPress block CSS" option is active
390 +* imgopt: also act on non-aggregated inline CSS
391 +* imgopt: added logic to warn users if Shortpixel can't reach their site
392 +* backend: AO toolbar JS/ CSS is finally minified as well.
393 +* explicitly disable optimization of login pages
394 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
395 +
396 += 3.1.5 =
397 +* improvements to JSMin by Robert Ehrenleitner (big thanks Robert!).
398 +* do not consider jquery.js as minified any more (WordPress now uses jquery.min.js by default and jquery.js is the unminified version).
399 +* fix for "undefined array key" PHP errors in autoptimizeCriticalCSSCron.php
400 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
401 +
402 += 3.1.4 =
403 +* Improvement: when all CSS is inlined, try doing so after SEO meta-tags (just before ld+json script tag which most SEO plugins add as last item on their list).
404 +* Img opt: also optimize images set in data-background and data-retina attributes (+ filter to easily add other attributes)
405 +* CSS opt: filter to enable AO to skip minification of calc formulas in CSS (as the CSS minifier on rare occasions breaks those)
406 +* Multiple other filters added
407 +* Some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
408 +
409 += 3.1.3 =
410 +* Multiple fixes for metabox LCP image preloads (thanks [Kishorchand](https://foxscribbler.com/) for notifying & providing a staging environment to debug on).
411 +* Fix in revslider compatibility (hat tip [Waqar Ahmed for reporting & helping out](https://wordpress.org/support/topic/issue-with-latest-version-of-slider-revolution/) ).
412 +* No image optimization or criticalcss attempts on localhost installations any more + notification of that fact if localhost detected.
413 +* Some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
414 +
415 += 3.1.2 =
416 +* Google Fonts: some more removal logic
417 +* fix for 404 fallback bug (hat tip to Asif for finding & reporting)
418 +* Some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
419 +
420 += 3.1.1.1 =
421 +* Quick workaround for an autoload conflict with JetFormBuilder (and maybe other Crocoblock plugins?) that causes a critical error on the AO settings page.
422 +
423 += 3.1.1 =
424 +* images: when optimizing images and lazyloading is on, then by default do not set an LQIP (low quality image placeholder) any more (reason: it might *look* nice but it comes with a small-ish perf. penalty). This can be re-enabled by returning true to the `autoptimize_filter_imgopt_lazyload_dolqip` filter.
425 +* security: further improvements to critical CSS settings page (again with the great assistance of WPScan Security).
426 +* some other minor changes/ improvements/ filters, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
427 +
428 += 3.1.0 =
429 +* new HTML sub-option: "minify inline CSS/ JS" (off by default).
430 +* new Misc option: permanently allow the "do not run compatibility logic" flag to be removed (which was set for users upgrading from AO 2.9.* to AO 3.0.* as the assumption was things were working anyway).
431 +* security: improvements to the critical CSS settings page to fix authenticated cross site scripting issues as reported by WPScan Security.
432 +* bugfix: "defer inline JS" of very large chunks of inline JS could cause server errors (PCRE crash actually) so not deferring if string is more then 200000 characters (filter available).
433 +* some other minor changes/ improvements/ hooks, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta)
434 +
435 += 3.0.4 =
436 +* fix for "undefined array key ao_post_preload” on post/ page edit screens
437 +* fix for image optimization altering inline JS that contains an `<img` tag if lazyload is not active
438 +* improvements to exit survey
439 +* confirmed working with WordPress 6.0
440 +
441 += 3.0.3 =
442 +* fix for images being preloaded without this being configured when lazyload is on and per page/post settings are off.
443 +* ensure critical CSS schedule is always known.
444 +* when deferring non-aggregated JS, make the optimatization exclusions take the full script-tag into account instead of just the src URL.
445 +
446 += 3.0.2 =
447 +* rollback automatic "minify inline CSS/ JS" which broke more then expected, this will come back as a separate default off option later and can now be enabled with a simple filter: `add_filter( 'autoptimize_html_minify_inline_js_css', '__return_true');` .
448 +* fix for "Call to undefined method autoptimizeOptionWrapper::delete_option()" in autoptimizeVersionUpdatesHandler.php
449 +
450 += 3.0.1 =
451 +* fix for minification of inline script with type text/template breaking the template (e.g. ninja forms), hat tip to @bobsled.
452 +* fix for regression in import of CSS-files where e.g. fontawesome CSS was broken due to being escaped again with help of @bobsled, thanks man!
453 +
454 += 3.0.0 =
455 +* fundamental change for new installations: by default Autoptimize will not aggregate JS/ CSS any more (HTTP/2 is ubiquitous and there are other advantages to not aggregating esp. re. inline JS/ CSS and dependancies)
456 +* new: no API needed any more to create manual critical CSS rules.
457 +* new: "Remove WordPress blocks CSS" option on the "Extra" tab to remove block- and global styles (and SVG).
458 +* new: compatibility logic for "edit with elementor", "revolution slider", for non-aggregated inline JS requiring jQuery even if not excluded (= auto-exclude of jQuery) and JS-heavy WordPress blocks (Gutenberg)
459 +* new: configure an image to be preloaded on a per page/ post basis for better LCP.
460 +* improvement: defer inline now also allowed if inline JS contains nonce or post_id.
461 +* improvement: settings export/ import on critical CSS tab now takes into account all Autoptimize settings, not just the critical CSS ones.
462 +* technical improvement: all criticalCSS classes were refactored, removing use of global variables.
463 +* technical improvement: automated unit tests on Travis-CI for PHP versions 7.2 to 8.1.
464 +* fix: stop Divi from clearing Autoptimize's cache [which is pretty counter-productive](https://blog.futtta.be/2018/11/17/warning-divi-purging-autoptimizes-cache/).
465 +* misc smaller fixes/ improvements, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta)
466 +
467 += older =
468 +* see [https://plugins.svn.wordpress.org/autoptimize/tags/2.9.5.1/readme.txt](https://plugins.svn.wordpress.org/autoptimize/tags/2.9.5.1/readme.txt)