PluginProbe
Autoptimize / trunk
Autoptimize vtrunk
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 +203 -175 2.6.0 → trunk View file →
@@ -1,22 +1,27 @@
1 1 === Autoptimize ===
2 2 Contributors: futtta, optimizingmatters, zytzagoo, turl
3 -Tags: optimize, minify, performance, pagespeed, images, lazy-load, google fonts
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: 5.3
7 -Requires PHP: 5.6
8 -Stable tag: 2.6.0
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
9 11
10 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.
11 13
12 14 == Description ==
13 15
14 -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, 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.
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).
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!
16 18
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)!
21 +
17 22 > <strong>Premium Support</strong><br>
18 -> We provide great [Autoptimize Pro Support and Web Performance Optimization services](https://autoptimize.com/), check out our offering on [https://autoptimize.com/](https://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, 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 ;-)
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.
@@ -62,9 +67,9 @@
62 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. 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.
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 73 = My cache is getting huge, doesn't Autoptimize purge the cache? =
69 74
70 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/).
@@ -83,9 +88,9 @@
83 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.
84 89
85 90 = My site looks broken when I purge Autoptimize's cache! =
86 91
87 -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 integretion between Autoptimize and some page caches, this integration does not cover 100% of setups so you might need to purge your page cache manually.
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.
88 93
89 94 = Can I still use Cloudflare's Rocket Loader? =
90 95
91 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.
@@ -93,9 +98,9 @@
93 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.
94 99
95 100 = I tried Autoptimize but my Google Pagespeed Scored barely improved =
96 101
97 -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 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.
98 103
99 104 = What can I do with the API? =
100 105
101 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.
@@ -109,9 +114,9 @@
109 114 = Why aren't my fonts put on the CDN as well? =
110 115
111 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;
112 117
113 -`add_filter('autoptimize_filter_css_fonts_cdn',__return_true);`
118 +`add_filter( 'autoptimize_filter_css_fonts_cdn', '__return_true' );`
114 119
115 120 = I'm using Cloudflare, what should I enter as CDN root directory =
116 121
117 122 Nothing, when on Cloudflare your autoptimized CSS/ JS is on the Cloudflare's CDN automatically.
@@ -127,21 +132,12 @@
127 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"
128 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"
129 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".
130 135
131 -= Configuring & Troubleshooting Autoptimize =
136 += Troubleshooting Autoptimize =
132 137
133 -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/
134 139
135 -If your blog doesn't function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using "advanced settings":
136 -
137 -* 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 soution for that problem also impacts performance for uncached pages) in this FAQ as well.
138 -* In case your blog looks weird, i.e. when the layout gets messed up, there is problem with CSS optimization. Try excluding one or more CSS-files from being optimized. 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.
139 -* 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.
140 -* 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).
141 -* If you can't get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
142 -* 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"
143 -
144 140 = I excluded files but they are still being autoptimized? =
145 141
146 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".
147 143
@@ -150,9 +146,9 @@
150 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.
151 147
152 148 = But I still have blank autoptimized CSS or JS-files! =
153 149
154 -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).
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).
155 151
156 152 = Can't log in on domain mapped multisites =
157 153
158 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:
@@ -182,13 +178,13 @@
182 178 Disable the option to optimize cart/ checkout pages (works for WooCommerce, Easy Digital Downloads and WP eCommerce).
183 179
184 180 = Revolution Slider is broken! =
185 181
186 -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).
187 183
188 184 = I'm getting "jQuery is not defined" errors =
189 185
190 -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.
191 187
192 188 = I use NextGen Galleries and a lot of JS is not aggregated/ minified? =
193 189
194 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");`
@@ -207,8 +203,12 @@
207 203 define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/');
208 204 define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_');
209 205 `
210 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 +
211 211 = Can the generated JS/ CSS be pre-gzipped? =
212 212
213 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.
214 214
@@ -217,9 +217,9 @@
217 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.
218 218
219 219 = Is "remove query strings" useful? =
220 220
221 -Although some online performance assessement 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.
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.
222 222
223 223 = (How) should I optimize Google Fonts? =
224 224
225 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".
@@ -229,9 +229,9 @@
229 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.
230 230
231 231 = When can('t) I async JS? =
232 232
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.js" you will very likely get "jQuery is not defined"-errors. Use with care.
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.
234 234
235 235 = How does image optimization work? =
236 236
237 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.
@@ -250,12 +250,8 @@
250 250
251 251 `
252 252 add_filter('autoptimize_filter_main_hookpagecachepurge','__return_false');`
253 253
254 -= Why can't I upgrade from 2.3.4 to 2.4.0 (or higher)? =
255 -
256 -Main reason (apart from occasional hickups that seem to be inherent to plugin upgrades) is that AO 2.4 requires you to be running PHP 5.3 or higher. And let's face it; you should actually be running PHP 7.x if you value performance (and security and support), no?
257 -
258 254 = Some of the non-ASCII characters get lost after optimization =
259 255
260 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;
261 257
@@ -261,8 +257,55 @@
261 257
262 258 `
263 259 add_filter('autoptimize_filter_main_use_mbstring', '__return_true');`
264 260
261 += I can't get Critical CSS working =
262 +
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.
264 +
265 += Do I still need the Critical CSS power-up when I have Autoptimize 2.7 or higher? =
266 +
267 +No, the Critical CSS power-up is not needed any more, all functionality (and many fixes/ improvements) are now part of Autoptimize.
268 +
269 += What does "enable 404 fallbacks" do? Why would I need this? =
270 +
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).
272 +
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).
274 +
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);
276 +
277 +`
278 +location ~* /wp-content/cache/autoptimize/.*\.(js|css)$ {
279 + try_files $uri $uri/ /wp-content/autoptimize_404_handler.php;
280 +}`
281 +
282 +And this a nice alternative approach (provided by fboylovesyou);
283 +
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 +}`
290 +
291 += What open source software/ projects are used in Autoptimize? =
292 +
293 +The following great open source projects are used in Autoptimize in some form or another:
294 +
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
307 +
265 308 = Where can I get help? =
266 309
267 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/).
268 311
@@ -277,164 +320,149 @@
277 320 Just [fork Autoptimize on Github](https://github.com/futtta/autoptimize) and code away!
278 321
279 322 == Changelog ==
280 323
281 -= 2.6.0 =
282 -* New: Autoptimize can be configured at network level or at individual site-level when on multisite.
283 -* Extra: new option to specify what resources need to be preloaded.
284 -* Extra: add `display=swap` to Autoptimized (CSS-based) Google Fonts.
285 -* Images: support for lazyloading of background-images when set in the inline style attribute of a div.
286 -* Images: updated to lazysizes 5.2.
287 -* CSS/ JS: no longer add type attributes to Autoptimized resources.
288 -* Improvement: cache clearing now also integrates with Kinsta, WP-Optimize & Nginx helper.
289 -* Added "Critical CSS" tab to highlight the criticalcss.com integration, which will be fully included in Autoptimize 2.7.
290 -* Batch of misc. smaller improvements & fixes, more info in the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
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
291 329
292 -= 2.5.1 =
293 -* Images: Also optimize & lazyload &lt;picture>&lt;source>
294 -* Images: Misc. improvements to lazyload
295 -* Images: Updated to LazySizes 5.0.0
296 -* CSS: improvements to the deferring logic for non-aggregated CSS resources.
297 -* Settings-page: Show "JS, CSS & HTML" advanced options by default (many people did not see the button)
330 += 3.1.15.1 =
331 +* fix for "Uncaught Error: Using $this when not in object context" when preloads are set
298 332
299 -= 2.5.0 =
300 -* moved image optimization to a separate tab and move all code to a separate file.
301 -* added lazyloading (using lazysizes)
302 -* added webp support (requires image optimization and lazyloading to be active)
303 -* added option to enable/ disable the minification of excluded JS/ CSS files (on by default)
304 -* misc. bugfixes and smaller improvements
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).
305 338
306 -= 2.4.4 =
307 -* bugfix: safer way of removing extra cronjobs
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
308 346
309 -= 2.4.3 =
310 -* improved Google Fonts optimzation, praise to @nextendweb (of Smartslider3 fame)!
311 -* improved deferring of non-aggregated CSS when "inline & defer" is active
312 -* bugfix: extra ao_cachechecker scheduled jobs & improve scheduling logic
313 -* bugfix: some extra checks on vars to avoid PHP notices
347 += 3.1.13 =
348 +* multiple minor changes/ improvements/ bugfixes, see the [GitHub commit log](https://github.com/futtta/autoptimize/commits/beta).
314 349
315 -= 2.4.2 =
316 -* misc. improvements to image optimization logic
317 -* update PAnD framework to latest version to fix issues with notices not staying dismissed
318 -* patched JS minifying component to not break template literals as reported by Alex Kozack
319 -* bugfix for Google fonts subset concatenation by Rocco Aliberti, thanks!
320 -* bugfix not to remove querystrings if that option is not on in "Extra", kudo's to Diego Versiani for pointing out the inconsistency
321 -* tested and confirmed working with WordPress 5.0 (beta 5)
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).
322 355
323 -= 2.4.1 =
324 -* bugfix for CSS minifier throwing a HTTP 500 error when a `}` is missing.
325 -* bugfix for slowness when iconv was used for multibyte string replacements (ditched iconv).
326 -* bugfix for occasional issues with broken/ missing </html> strings due to mbstring (also for multibyte string replacement) weirdness.
327 -* bugfix for wrong sizes in image optimization.
328 -* bugfix for Google Font subset getting lost in optimization.
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).
329 359
330 -= 2.4.0 =
331 -* refactored significantly (no more "classlesses", all is OO), classes are autoloaded, tests added (travis-ci) by zytzagoo who deserves praise for his hard work!
332 -* new: image optimization (see "Extra"-tab) using Shortpixel's smart image optimization proxy
333 -* new: you can now disable JS/ CSS-files being aggregated, having them minified individually instead
334 -* new: Google Fonts can now be "aggregated & preloaded", this uses CSS which is loaded non render-blocking
335 -* new: Autoptimize "listens" to page caches being cleared, upon which it purges it's own cache as well. Support depends on known action hooks firing by the page cache, supported by Hyper Cache, WP Rocket, W3 Total Cache, KeyCDN Cache Enabler, Swift, WP Super Cache, WP Fastest Cache and Comet Cache.
336 -* new: local JS/ CSS-files that are excluded from optimization are minified by default (can be overridden by filter)
337 -* improvement: updated minifiers (with very significant improvements for YUI CSS compressor PHP port)
338 -* improvement: "remove all Google Fonts" is now more careful (avoiding removing entire CSS blocks)
339 -* misc. under the hood improvements (e.g. more robust cache clearing, better support for multibyte character sets, improved CDN rewrite logic, avoid PHP warnings when writing files to cache, ...)
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).
340 366
341 -= 2.3.4 =
342 -* bugfix: is_plugin_active causing errors in some cases as [reported by @iluminancia and @lozula](https://wordpress.org/support/topic/fatal-error-after-update-to-2-3-3/)
343 -* bugfix: added language domain to 4 __/_e functions, un grand merci à Guillaume Blet!
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).
344 375
345 -= 2.3.3 =
346 -* improvement: updated to latest version of Filamentgroup's loadCSS
347 -* improvement: by default exclude `wp-content/cache` and `wp-content/uploads` from CSS optimization (Divi, Avada & possibly others store page-specific CSS there)
348 -* bugfix: stop double try/catch-blocks
349 -* misc. bugfixes (see [GitHub commit log](https://github.com/futtta/autoptimize/commits/master))
350 -* heads-up: this is (supposed to be) the last minor release of the 2.3 branch, [2.4 is a major change with some big under-the-hood and functional changes](https://blog.futtta.be/2018/02/18/introducing-zytzagoos-major-changes-for-autoptimize-2-4/)
376 += 3.1.8.1 =
377 +* urgent fix for PHP error, sorry about that!
351 378
352 -= 2.3.2 =
353 -* workaround for [stale options-data in external object cache such as Redis, Memcached (core bug)](https://core.trac.wordpress.org/ticket/31245) resulting in Autoptimize continuously executing the upgrade-procedure including clearing the cache and trying to preload it with HTTP-requests with "cachebuster" in the query string, thanks to [Haroon Q. Raja](https://hqraja.com/) and [Tomas Trkulja](https://twitter.com/zytzagoo) for their great assistance!
354 -* fixes for "undefined index" notices on Extra settings page
355 -* now removing respective dns-prefetch resource hints when "remove emojis" or when Google Fonts are optimized or removed.
356 -* changed JS code to load webfont.js deferred instead of asynced to make sure the js-file or fonts are not consider render blocking.
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).
357 383
358 -= 2.3.1 =
359 -* fix for issue with update-code in some circumstances, thanks to [Rajendra Zore](https://rajendrazore.com/) to report & help fix!
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.
360 386
361 -= 2.3.0 =
362 -* new: optimize Google fonts with "combine & link" and "combine and load async" (with webload.js), intelligently preconnecting to Google's domains to limit performance impact even further
363 -* new: Async JS, can be applied to local or 3rd party JS (if local it will be auto-excluded from autoptimization)
364 -* new: support to tell browsers to preconnect (= dns lookup + tcp/ip connection + ssl negotiation) to 3rd party domains (depends on browser support, works in Chrome & Firefox)
365 -* new: remove WordPress' core's emoji CSS & JS
366 -* new: remove (version parameter from) Querystring
367 -* new: support to clear cache through WP CLI thanks to [junaidbhura](https://junaidbhura.com)
368 -* lots of [bugfixes and small improvements done by some seriously smart people via GitHub](https://github.com/futtta/autoptimize/commits/master) (thanks all!!), including [a fix for AO 2.2 which saw the HTML minifier go PacMan on spaces](https://github.com/futtta/autoptimize/commit/0f6ac683c35bc82d1ac2d496ae3b66bb53e49f88) in some circumstances.
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).
369 395
370 -= 2.2.2 =
371 -* roll-back to previous battle-tested version of the CSS minifier
372 -* tweaks to Autoptimize toolbar menu (visual + timeout of "delete cache" AJAX call)
373 -* readme update
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).
374 401
375 -= 2.2.1 =
376 -* fix for images being referenced in CSS not all being translated to correct path, leading to 404's as reported by Jeff Inho
377 -* fix for "[] operator not supported for strings" error in PHP7.1 as reported by falk-wussow.de
378 -* fix for security hash busting AO's cache in some cases (esp. in 2.1.1)
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).
379 408
380 -= 2.2.0 =
381 -* new: Autoptimize minifies first (caching the individual snippets) and aggregrates the minified snippets, resulting in huge performance improvements for uncached JS/ CSS.
382 -* new: option to enable/ disable AO for logged in users (on by default)
383 -* new: option to enable/ disable AO on WooCommerce, Easy Digital Downloads or WP eCommerce cart/ checkout page (on by default)
384 -* 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/)
385 -* improvement: switched to YUI CSS minifier PHP-port 2.8.4-p10 (so not to the 3.x branch yet)
386 -* improvements to the logic of which JS/ CSS can be optimized (getPath function) increasing reliability of the aggregation process
387 -* 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!!
388 -* API: Lots of extra filters, making AO (even) more flexible.
389 -* Lots of bugfixes and smaller improvements (see [GitHub commit log](https://github.com/futtta/autoptimize/commits/master))
390 -* tested and confirmed working in WordPress 4.8
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).
391 414
392 -= 2.1.2 =
393 -* fix for security hash busting AO's cache in some cases (esp. in 2.1.1)
394 -* identical to 2.1.0 except for the security fix backported from 2.2.0
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).
395 419
396 -= 2.1.1 =
397 -* identical to 2.1.0 except for the security fix backported from 2.2.0
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.
398 422
399 -= 2.1.0 =
400 -* 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!
401 -* 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.
402 -* 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)
403 -* 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!
404 -* improvement: admin GUI updated (again; thanks Pablo!) with some responsiveness added in the mix (not showing the right hand column on smaller screen-sizes)
405 -* improvement: settings-screen now accepts protocol-relative URL for CDN base URL
406 -* improvement: new (smarter) defaults for JS (don't force in head + exclude jquery.js) and CSS optimization (include inline CSS)
407 -* Misc. bugfixes & small improvements (see [commit-log on GitHub](https://github.com/futtta/autoptimize/commits/master))
408 -* Minimal version updated from 2.7 (!) to 4.0
409 -* Tested and confirmed working on WordPress 4.6
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).
410 427
411 -= 2.0.2 =
412 -* bugfix: disallow moving non-aggregated JS by default (can be re-enabled by passing false to the `autoptimize_filter_js_unmovable`)
413 -* bugfix: hook autoptimize_action_cachepurged into init to avoid ugly error-message for ZenCache (Comet Cache) users
414 -* 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/))
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)
415 434
416 -= 2.0.1 =
417 -* Improvement: Autoptimize now also tries to purge WP Engine cache when AO's cache is cleared
418 -* 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
419 -* Improvement: refactored the page cache purging mechanism (removing duplicate code, now nicely hooking into AO's own `autoptimize_action_cachepurged` action)
420 -* 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)
421 -* Improvement: script tags with `data-noptimize` attribute will be excluded from optimization
422 -* Bugfix: Better support for renamed wp-content directories
423 -* 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, ...)
424 -* Misc. other fixes & improvements, go read [the commit-log on GitHub](https://github.com/futtta/autoptimize/commits/master) if you're that curious
425 -* Tested & confirmed working with WordPress 4.5 (beta 3)
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
426 440
427 -= 2.0.0 =
428 -* On average 30% faster minification (more info [in this blogpost](http://blog.futtta.be/2015/12/22/making-autoptimize-faster/))!
429 -* New: Option to (de-)activate aggregation of inline JS and CSS.
430 -* New: Option to remove Google Fonts.
431 -* 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).
432 -* New: Small autoptimized CSS (less then 256 characters, can be changed by filter) will be inlined instead of linked.
433 -* 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.
434 -* 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).
435 -* New in API: filter to move fonts to CDN as well.
436 -* 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).
437 -* tested and confirmed working with PHP7
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.
438 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 +
439 467 = older =
440 -* see [https://plugins.svn.wordpress.org/autoptimize/tags/2.3.4/readme.txt](https://plugins.svn.wordpress.org/autoptimize/tags/2.3.4/readme.txt)
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)