Autoptimize

説明

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!

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, HyperCache, Comet Cache or KeyCDN’s Cache Enabler.

Premium Support
We provide great Autoptimize Pro Support and Web Performance Optimization services, check out our offering on (http://autoptimize.com/)!

(Speed-surfing image under creative commons by LL Twistiti)

インストール

Just install from your WordPress “Plugins > Add New” screen and all will be well. Manual installation is very straightforward as well:

  1. ZIP ファイルをアップロードし、/wp-content/plugins/ ディレクトリで解凍
  2. WordPress の「プラグイン」メニューからプラグインを有効化
  3. 設定 > Autoptimizeへ移動し、ご希望のオプションを有効化します。一般的に、これは「HTML / CSS / JavaScript の最適化」を意味します。

FAQ

インストール手順

Just install from your WordPress “Plugins > Add New” screen and all will be well. Manual installation is very straightforward as well:

  1. ZIP ファイルをアップロードし、/wp-content/plugins/ ディレクトリで解凍
  2. WordPress の「プラグイン」メニューからプラグインを有効化
  3. 設定 > Autoptimizeへ移動し、ご希望のオプションを有効化します。一般的に、これは「HTML / CSS / JavaScript の最適化」を意味します。
プラグインは、サイトを高速化するために何をしてくれますか。

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.

But I’m on HTTP/2, so I don’t need Autoptimize?

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, as described in this css-tricks.com article and this blogpost from one of the Ebay engineers. 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).

Will this work with my blog?

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.

Why is jquery.js not optimized

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”).

Why is Autoptimized JS render blocking?

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.

Why is the autoptimized CSS still called out as render blocking?

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.

What is the use of “inline and defer CSS”?

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!

But how can one find out what the “above the fold CSS” is?

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 is a great starting point. http://jonassebastianohlsson.com/criticalpathcssgenerator/ is a nice basic solution and http://criticalcss.com/ is a premium solution by the same developer. Alternatively this bookmarklet (Chrome-only) can be helpful as well.

Or should you inline all CSS?

The short answer: probably not.

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.

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.

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.

You can find more information on this topic in this blog post.

キャッシュが巨大化してきています。Autoptimize はキャッシュをパージしないのですか。

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.

Instead you can keep the cache size at an acceptable level by either:

  • disactivating the “aggregate inline JS” and/ or “aggregate inline CSS” options
  • 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.

Despite above objections, there are 3rd party solutions to automatically purge the AO cache, e.g. using this code or this plugin, but for reasons above these are to be used only if you really know what you’re doing.

Upon updating Autoptimize can’t be reactivated

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.

“Clear cache” doesn’t seem to work?

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.

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.

Can I still use Cloudflare’s Rocket Loader?

Cloudflare Rocket Loader is a pretty advanced but invasive way to make JavaScript non-render-blocking, which Cloudflare still considers Beta. 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.

At the moment (June 2017) it seems RocketLoader might break AO’s “inline & defer CSS”, which is based on Filamentgroup’s loadCSS, resulting in the deferred CSS not loading.

I tried Autoptimize but my Google Pagespeed Scored barely improved

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.

インライン CSS / JS を集約するべきですか ?

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.

API で何ができますか ?

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.

How can I use the code in autoptimize_helper.php_example?

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 to manage any custom code.

How does CDN work?

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).

If you want your uploaded images to be on the CDN as well, you can change the upload_url_path in your WordPress configuration (/wp-admin/options.php) to the target CDN upload directory (e.g. http://cdn.example.net/wordpress/wp-content/uploads/). Do take into consideration this only works for images uploaded from that point onwards, not for images that already were uploaded. Thanks to BeautyPirate for the tip!

Why aren’t my fonts put on the CDN as well?

Autoptimize supports this, but it is not enabled by default because non-local fonts might require some extra configuration. 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;

add_filter('autoptimize_filter_css_fonts_cdn',__return_true);
CloudFlare を使っていますが、CDN のルートディレクトリには何を入力すれば良いですか。

Nothing, when on Cloudflare your autoptimized CSS/ JS is on the Cloudflare’s CDN automatically.

How can I force the aggregated files to be static CSS or JS instead of PHP?

If your webserver is properly configured to handle compression (gzip or deflate) and cache expiry (expires and cache-control with sufficient cacheability), you don’t need Autoptimize to handle that for you. In that case you can check the “Save aggregated script/css as static files?”-option, which will force Autoptimize to save the aggregated files as .css and .js-files (meaning no PHP is needed to serve these files). This setting is default as of Autoptimize 1.8.

How does “exclude from optimizing” work?

Both CSS and JS optimization can skip code from being aggregated and minimized by adding “identifiers” to the comma-separated exclusion list. The exact identifier string to use can be determined this way:

  • 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”
  • 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”
  • 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”.
Autoptimize 設定とトラブルシューティング

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.

If your blog doesn’t function normally after having turned on Autoptimize, here are some pointers to identify & solve such issues using “advanced settings”:

  • 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.
  • 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.
  • 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“) 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.
  • 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).
  • If you can’t get either CSS or JS optimization working, you can off course always continue using the other two optimization-techniques.
  • 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. See below for a description of what information you should provide in your “trouble ticket”
助けてください。Autoptimize の有効化後、空白のページまたは内部サーバーエラーが発生しました。

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, …).

In some rare cases the CSS minification component currently used by Autoptimize crashes due to a lack of resources (see detailed technical explanation here). 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:

define("AUTOPTIMIZE_LEGACY_MINIFIERS","true");

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.

But I still have blank autoptimized CSS or JS-files!

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.

エラーはありませんが、ページが最適化されていません。

Autoptimize does a number of checks before actually optimizing. When one of the following is true, your pages won’t be optimized:

  • カスタマイザー内にいる場合
  • 開じタグがない <html タグがない場合
  • if there is <xsl:stylesheet in the response (indicating the output is not HTML but XML)
  • ある場合 の応答で (アンプのページは既に最適化されています)、
  • if the output is an RSS-feed (is_feed() function)
  • if the output is a WordPress administration page (is_admin() function)
  • ?ao_noptimize=1 を URL の末尾に追加したページが要求された場合
  • 最適化を無効にするために Autoptimize にコードがフックする場合 (Visual Composer
    のトピックを参照)
  • if other plugins use the output buffer in an incompatible manner (disable other plugins selectively to identify the culprit)
Visual Composer, Beaver Builder and similar page builder solutions are broken!!

Disable the option to have Autoptimize active for logged on users and go crazy dragging and dropping ;-)

Help, my shop checkout/ payment don't work!!

Disable the option to optimize cart/ checkout pages (works for WooCommerce, Easy Digital Downloads and WP eCommerce).

Revolution Slider が動きません。

Make sure js/jquery/jquery.js is in the comma-separated list of JS optimization exclusions (this is excluded in the default configuration).

「jQuery が定義されていません」というエラーが表示されます

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.

2.1から2.2へのアップグレード後、Autoptimize された CSS/JS が壊れました。

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;

add_filter('autoptimize_filter_speedupper','__return_false');
NextGen Galleries を使っていますが、多くの JS ファイルが集約・圧縮されていません。

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");

What is noptimize?

Starting with version 1.6.6 Autoptimize excludes everything inside noptimize tags, e.g.:
<!--noptimize--><script>alert('this will not get autoptimized');</script><!--/noptimize-->

You can do this in your page/ post content, in widgets and in your theme files (consider creating a child theme to avoid your work being overwritten by theme updates).

Can I change the directory & filename of cached autoptimize files?

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:

define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/');
define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_');
Can the generated JS/ CSS be pre-gzipped?

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.

ヘルプはどこで入手できますか。

You can get help on the wordpress.org support forum. 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. If you're looking for premium support, check out our Autoptimize Pro Support and Web Performance Optimization services.

もうやめたいです。Autoptimize をどうやって削除できますか ?
  • プラグインを無効化 (これによりオプションとキャッシュが削除されます)
  • プラグインを削除
  • 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)
貢献するには

Just fork Autoptimize on Github and code away!

評価

Superbe extension !

Cette extension est superbe et très facile à utiliser. Il n’y a pas grand chose à paramétrer, ce qui en fait un plugin assez simple d’utilisation. Et mes pages s’affichent beaucoup plus rapidement. Superbe !

Vitoutso.

Just awesome

Easy to use and does a perfect job!
Its always one of the first plugins I install on every website.
Keep up the good work.

99 problems and autoptimize is one

I’m not sure how much it optimizes and speeds up my sites, but I build and host websites and every site Ive put autoptimize on eventually runs into problems. Problems that are fixed when I disable this plugin. Feel free to try it, it might work better for someone else, but if you hit bugs your first step should be disabling this.

DO NOT TOUCH

Destroyed my blog!!! Physical disk memory through the roof, 503 error as was using all resources, could not stop it in cpanel, no matter what.

535件のレビューをすべて表示

貢献者と開発者

Autoptimize はオープンソースソフトウェアです。以下の人々がこのプラグインに貢献しています。

貢献者

“Autoptimize” は18ロケールに翻訳されています。 翻訳者のみなさん、翻訳へのご協力ありがとうございます。

“Autoptimize” をあなたの言語に翻訳しましょう。

開発に興味がありますか ?

コードを閲覧するか、SVN リポジトリをチェックするか、開発ログRSS で購読してみてください。

変更履歴

2.2.2

  • 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)
  • tweaks to Autoptimize toolbar menu (visual + timeout of “delete cache” AJAX call)
  • readme update

2.2.1

  • CSS で参照されている画像のすべてが正しいパスに変換されていないために404エラーが発生する問題を修正。Jeff Inho 氏による報告。
  • fix for “[] operator not supported for strings” error in PHP7.1 as reported by falk-wussow.de
  • 一部のケースで AO キャッシュのセキュリティハッシュバストを修正 (特に2.1.1で)

2.2.0

  • new: Autoptimize minifies first (caching the individual snippets) and aggregrates the minified snippets, resulting in huge performance improvements for uncached JS/ CSS.
  • 新機能: ログイン中ユーザーに対し AO を有効化・無効化にするオプション (デフォルトでは有効化)
  • new: option to enable/ disable AO on WooCommerce, Easy Digital Downloads or WP eCommerce cart/ checkout page (on by default)
  • 改善: rel=preload + Filamentgroup の CSS 遅延用 loadCSS に切り替え
  • 改善: YUI CSS minifier PHP-port 2.8.4-p10 に切り替え (このため、まだ3.xブランチではありません)
  • improvements to the logic of which JS/ CSS can be optimized (getPath function) increasing reliability of the aggregation process
  • 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!!
  • API: 数多くの追加フィルターにより、AO をさらに柔軟に。
  • Lots of bugfixes and smaller improvements (see GitHub commit log)
  • tested and confirmed working in WordPress 4.8

2.1.2

  • 一部のケースで AO キャッシュのセキュリティハッシュバストを修正 (特に2.1.1で)
  • 2.2.0からバックポートされたセキュリティ修正を除き、2.1.0と同一

2.1.1

  • 2.2.0からバックポートされたセキュリティ修正を除き、2.1.0と同一

2.1.0

  • 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 for his hard work on this nice feature!
  • 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.
  • 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)
  • 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!
  • improvement: admin GUI updated (again; thanks Pablo!) with some responsiveness added in the mix (not showing the right hand column on smaller screen-sizes)
  • improvement: settings-screen now accepts protocol-relative URL for CDN base URL
  • improvement: new (smarter) defaults for JS (don’t force in head + exclude jquery.js) and CSS optimization (include inline CSS)
  • その他バグの修正と細かい改善 ( GitHub でコミットログを参照)
  • Minimal version updated from 2.7 (!) to 4.0
  • Tested and confirmed working on WordPress 4.6

2.0.2

  • bugfix: disallow moving non-aggregated JS by default (can be re-enabled by passing false to the autoptimize_filter_js_unmovable)
  • bugfix: hook autoptimize_action_cachepurged into init to avoid ugly error-message for ZenCache (Comet Cache) users
  • bugfix to allow for Autoptimize to work with PHP 5.2 (although you really should upgrade)

2.0.1

  • Improvement: Autoptimize now also tries to purge WP Engine cache when AO’s cache is cleared
  • 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
  • Improvement: refactored the page cache purging mechanism (removing duplicate code, now nicely hooking into AO’s own autoptimize_action_cachepurged action)
  • 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)
  • Improvement: script tags with data-noptimize attribute will be excluded from optimization
  • Bugfix: Better support for renamed wp-content directories
  • 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, …)
  • Misc. other fixes & improvements, go read the commit-log on GitHub if you’re that curious
  • WordPress 4.5 (ベータ 3) でのテストおよび動作確認

2.0.0

  • On average 30% faster minification (more info in this blogpost)!
  • 新機能: インライン JS と CSS の集約を有効化・無効化するオプション。
  • 新機能: Google フォントを削除するオプション。
  • 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).
  • New: Small autoptimized CSS (less then 256 characters, can be changed by filter) will be inlined instead of linked.
  • 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.
  • 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).
  • New in API: filter to move fonts to CDN as well.
  • 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.
  • PHP7 でテスト、動作確認

1.9.4

  • 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
  • bugfix: make default add_action hook back into “template_redirect” instead of “init” to fix multiple problems as reported by schecteracademicservices, bond138, rickenbacker, Rick Sportel and wizray. If you do need Autoptimize to initialize earlier (e.g. when using Nextgen Galleries), then add this to your wp-config.php:
    define(“AUTOPTIMIZE_INIT_EARLIER”,”true”);

1.9.3

  • improvement: more intelligent CDN-replacement logic, thanks Squazz for reporting and testing
  • improvement: allow strings (comments) to be excluded from HTML-optimization (comment removal)
  • 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
  • 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)
  • 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
  • bugfix: remove some PHP notices, as reported by dimitrov.adrian
  • bugfix: make sure HTML-optimalization does not gobble a space before a cite as proposed by ecdltf
  • bugfix: cleaning the cache did not work on non-default directories as encountered by NoahJ Champion
  • upgraded to yui compressor php port 2.4.8-4
  • added arabic translation, thanks to the ekleel team
  • WordPress 4.2 ベータ3でテスト

1.9.2

まず最初に、Happy holidays ! 良い2015年になりますように。

  • New: support for alternative cache-directory and file-prefix as requested by a.o. Jassi Bacha, Cluster666 and Baris Unver.
  • Improvement: hard-exclude all linked-data json objects (script type=application/ld+json)
  • Improvement: several filters added to the API, e.g. to alter optimized HTML, CSS or JS
  • Bugfix: set Autoptimize priority back from 11 to 2 (as previously) to avoid some pages not being optimized (thanks to CaveatLector for investigating & reporting)
  • Bugfix (in YUI-CSS-compressor-PHP-port): don’t convert bools to percentages in rotate3D-transforms (cfr. bugreport on Github)
  • Bugfix: background images with a space in the path didn’t load, reported by johnh10.
  • Bugfix: SVG image with fill:url broken after CSS optimization as reported by Tkama
  • Updated translation for Swedish, new translation for Ukrainian by Zanatoly of SebWeo.com
  • Updated readme.txt
  • Confirmed working with WordPress 4.1

1.9.1

1.9.0

  • “Inline and defer CSS” allows one to specify which “above the fold CSS” should be inlined, while the normal optimized CSS is deferred.
  • 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).
  • 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).
  • Autoptimized CSS is now injected before the -tag, JS before (and after when forced in head). This can be overridden in the API.
  • Some usability improvements of the administration-page
  • 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.
  • Updated translations for Dutch, French, German, Persian and Polish and new translations for Brazilian Portuguese (thanks to Leonardo Antonioli) and Turkish (kudo’s Baris Unver)
  • Multiple bugfixes & improvements
  • Tested with WordPress 4.0 rc3

1.8.5

  • Updated to lastest version of CSS minification component
  • 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, kudo’s Joern!!
  • Improvement: add WordPress plugin header to autoptimize_helper.php_example to make it easier to enable it as a module
  • Improvement: nonce and post_id are added to default configuration for JS exclusion
  • Improvement: explicitely exclude wp-admin from being Autoptimized
  • Bugfix: plupload.min.js, syntaxhighlighter and “adsbygoogle” are excluded from JS aggregation.
  • Bugfix: avoid double closing body-tags when Autoptimize adds JS to HTML as reported by Can
  • Bugfix: make .htaccess compatible with both Apache 2.2 and 2.4 (https://wordpress.org/support/topic/feature-request-support-generating-htaccess-files-for-apache-24?replies=3)

1.8.4

  • 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.

1.8.3

1.8.2

  • Improvement: more graceful failure when minifier classes exist but method does not, based on bug-report by Franck160
  • Improvement: deferred CSS is also outputted in noscript-tags
  • Improvement: differentiate between Apache version in .htaccess file as suggested by iMadalin
  • Improvement: also aggregate protocol-less CSS/JS URI’s (as suggested by Ross)
  • Improvement: disable autoptimization based on parameter in querystring (for debugging)
  • バグ修正: 一部の CSS インポートが集約/圧縮されていない問題
  • Bugfix: add CSS before <title instead of to avoid breakage when title includes other attributes (e.g. itemscope)
  • Bugfix: make sure javascript or css between comments is not aggregated as reported by Milap Gajjar
  • Tested with WordPress 3.9 (beta 1)
  • よくある質問を更新

1.8.1

  • bugfix: CSS in conditional comments was not excluded from aggregation as reported by Rolf and bottapress

1.8.0

  • New: Option to inline all CSS as suggested by Hamed
  • 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. https://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.
  • Improvement: exclude (css in) noscript-tags as proposed by belg4mit
  • Improvement: switch default delivery of optimized CSS/JS-files from PHP to static files
  • Updated upstream CSS minifier
  • Improvement (force gzip of static files) and Bugfix (force expiry for dynamic files, thanks to Willem Razenberg in .htaccess
  • Improvement: fail gracefully when things go wrong (e.g. CSS import resulting in empty aggregated CSS-files reported by Danka or when the theme is broken as seen by Prateek Gupta)
  • Updated translations and Polish added (thanks to Jakub Sierpinski).
  • Bugfix: stop import-statements in CSS comments to be taken into acccount hat tip to Josef from blog-it-solutions.de
  • Bugfix: fix for blur in CSS breakeage as reported by Chris of clickpanic.com

1.7.3

  • improvement: remove cache + options on uninstall as requested by Gingerbreadmen
  • 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).
  • bugfix: avoid Yoast SEO sitemaps going blank (due optimization of Yoast’s dynamically built XML/XSL) as reported by Vance Hallman and Armand Hadife. More info on this issue can be found on my blog.
  • readme.txt に小さな変更

1.7.2

  • 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 and by Peter Stolwijk
  • 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
  • tested and approved for WordPress 3.8 (beta1)

1.7.1

  • New: support for mapped domains as suggested by Michael for tiremoni.com
  • 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 by Hugh of www.unitedworldschools.org)
  • bugfix: Autoptimize broke data:uri’s in CSS in some cases as reported by Josef from blog-it-solutions.de
  • バグ修正: CSS 除外リストが空の場合、PHP の注意 (Notice) を表示しない
  • moved “do not donate”-image into plugin

1.7.0

1.6.6

  • New: disable autoptimizatoin by putting part of your HTML, JS or CSS in between noptimize-tags, e.g.;
    alert(‘this will not get autoptimized’);
  • Added extra check to prevent plugin-files being called outside of WordPress as suggested in this good article on security.
  • Added small notice to be displayed after installation/ activation to ask user to configure the plugin as well.
  • Hamed T. 氏によるペルシア語の翻訳を追加

1.6.5

  • new javascript-debug option to force the aggregated javascript file in the head-section of the HTML instead of at the bottom
  • YUI 圧縮と CDN が非推奨機能となり、1.7.0 で削除される予定

1.6.4

1.6.3

  • fix for IE-hacks with javascript inside, causing javascript breakage (as seen in Sampression theme) as reported by Takahiro of hiskip.com
  • fix for escaping problem of imported css causing css breakage (as seen in Sampression theme) as reported by Takahiro as well
  • fix to parse imports with syntax @import ‘custom.css’ not being parsed (as seen in Arras theme), again as reported by Takahiro
  • fix for complex media types in media-attribute as reported by jvwisssen
  • fix for disappearing background-images that were already datauri’s as reported by will.blaschko
  • fix not to strip out comments in HTML needed by WP Super Cache or W3 Total Cache (e.g. mfunc)
  • added check to clean cache on upgrade
  • トラブルシューティングとサポートに関する情報と共に readme の FAQ を更新
  • tested with WordPress 3.6 beta

1.6.2

  • 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!

1.6.1

  • fixed stupid typo in config/delayed.php which broke things badly (april fools-wise); strpos instead of str_pos as reported by Takahiro.

1.6.0

  • 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.
  • Added support for ETag and LastModified (essentially for a better pagespeed score, as the files are explicitely cacheable for 1 year)
  • ログイン中のユーザーの Autoptimizing を再有効化
  • Autoptimize now creates an index.html in wp-content/cache/autoptimize to prevent snooping (as proposed by Chris)
  • bugfix: removed all deprecated functions (reported by Hypolythe and diff by Heiko Adams, thanks guys!)
  • bugfix for HTTPS-problem as reported by dbs121
  • bugfix for breakage with unusual WordPress directory layout as reported by Josef from blog-it-solutions.de.

1.5.1

  • bugfix: add CSS before opening title-tag instead of after closing title, to avoid CSS being loaded in wrong order, as reported by fotofashion and blogitsolutions (thanks guys)

1.5

  • first bugfix release by futtta, thanks for a great plugin Turl!
  • misc bug fixes, a.o. support for Twenty Twelve theme, admin bar problem in WP3.5, data-uri breaking CSS file naming

1.4

  • CSS メディアでのインラインスタイルタグのサポートを追加
  • Fix WordPress top bar

1.3

  • inyMCEComments 向けの回避策を追加
  • 非同期 Google アナリティクス向けの回避策を追加

1.2

  • Chitika 広告向けの回避策を追加。
  • LinkWithin ウィジェット向けの回避策を追加。
  • ベラルーシ語翻訳

1.1

  • Amazon と FastClick 向けの回避策を追加
  • Comment Form Quicktags 向けの回避策を追加
  • Fix issue with Vipers Video Quicktags
  • Fix a bug in where some scripts that shouldn’t be moved were moved
  • 設定ページが表示されないバグを修正
  • @import の処理を修正
  • JS/CSS の gzip 化を無効にするオプションを実装
  • CDN 機能を実装
  • データ実装: 画像向け URI 生成
  • Support YUI CSS/JS Compressor
  • Performance increases
  • WP Super Cache のキャッシュファイル処理を改善
  • 翻訳を更新

1.0

  • whos.among.us 向けの回避策を追加
  • HTML コメントの保持をサポート
  • Implement “delayed cache compression”
  • フランス語翻訳
  • スペイン語翻訳を更新

0.9

  • NetworkedBlogs 向けの回避策を追加。
  • Histats と StatCounter 向けの回避策を追加
  • Smowtion と Infolinks 向けの回避策を追加。
  • Featured Content Gallery 向けの回避策を追加
  • 簡体字中国語翻訳
  • スペイン語翻訳を更新
  • Modify the cache system so it uses wp-content/cache/
  • Add a clear cache button

0.8

  • Vipers Video Quicktags 向けの回避策を追加
  • メディアのないタグをサポート。
  • CSS の URL を破壊しないために、さらに多くの予防措置を実行
  • Support adding try-catch wrappings to JavaScript code
  • WordPress.com Stats 向けの回避策を追加
  • Fix a bug in where the tags wouldn’t move
  • 翻訳テンプレートを更新
  • スペイン語翻訳を更新

0.7

  • DISQUS Comment System に対する修正を追加。

0.6

  • MyBlogLog、BlogCatalog、TweetMeme、Google CSE 向けの回避策を追加

0.5

  • ローカリゼーションサポート
  • Fix the move and don’t move system (again)
  • Improve url detection in CSS
  • Support looking for scripts and styles on just the header
  • Fix an issue with data: uris getting modified
  • スペイン語翻訳

0.4

  • プラグインの説明を英語で書く
  • Set default config to everything off
  • Add link from plugins page to options page
  • Fix problems with scripts that shouldn’t be moved and were moved all the same

0.3

  • Disable CSS media on @imports – caused an infinite loop

0.2

  • Support CSS media
  • IE のハック維持機構の問題を修正
  • Fix an issue with some urls getting broken in CSS

0.1

  • First released version.