Autoptimize

Beschreibung

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.
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 or KeyCDN’s Cache Enabler) to complement Autoptimize or even consider Autoptimize Pro which not only has page caching but also image optimization, CDN, critical CSS and more!

Autoptimize Pro
Autoptimize Pro is a premium Power-Up, 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!!

Premium Support
We provide great Premium Support and Web Performance Optimization services with Accelera, check out our offering on https://accelerawp.com/!

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

Installation

Installiere einfach über „Plugins hinzufügen“ in WordPress und alles wird gut sein. Eine manuelle Installation ist ebenfalls sehr unkompliziert:

  1. Lade die zip-Datei hoch und entpacke sie im /wp-content/plugins/ Verzeichnis
  2. Aktiviere das Plugin im „Plugins“-Menü in WordPress.
  3. Gehe zu Einstellungen > Autoptimize und aktiviere die gewünschten Optionen. Normalerweise bedeutet dies „Optimiere HTML/ CSS/ JavaScript“.

FAQ

Was macht das Plugin, um dabei zu helfen meine Website zu beschleunigen?

Es minimiert alle Skripte und Styles und konfiguriert deinen Webserver so, dass er sie mit guten Expires-Headern komprimiert. JavaScript wird standardmäßig nicht-render-blockierend gemacht und CSS kann durch Hinzufügen von kritischem CSS ebenfalls blockiert werden. Du kannst es so konfigurieren, dass es CSS- und JS-Dateien kombiniert (aggregiert); in diesem Fall werden die Stile in den Kopf der Seite und die Skripte in den Fußbereich verschoben. Außerdem minimiert es den HTML-Code und kann auch Bilder und Google Fonts optimieren, sodass deine Seite wirklich schlank wird.

Ich bin schon auf HTTP/2, brauche ich da Autoptimize noch?

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, 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, 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 😉

Wird das mit meinem Blog funktionieren?

Obwohl Autoptimize ohne jegliche Garantie geliefert wird, funktioniert es im Allgemeinen einwandfrei, wenn du es richtig konfigurierst. Unter „Problembehandlung“ erfährst du, wie du das Programm im Falle von Fehlfunktionen konfigurieren kannst. Wenn du willst, kannst du Autoptimize auf einer neuen kostenlosen Dummy-Website testen, mit freundlicher Genehmigung von tastewp.com.

Warum wird jquery.min.js beim Aggregieren von JavaScript nicht optimiert?

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

Warum blockiert von Autoptimize generierter JavaScript-Code das Rendering?

Das passiert, wenn du JavaScript aggregierst und die Option „im Kopf erzwingen“ aktivierst oder wenn du nicht aggregierst und nicht aufschiebst. Erwäge, die Einstellungen zu ändern.

Warum wird das autoptimierte CSS noch immer als „render blocking“ bezeichnet?

Mit der Standard-Konfiguration von Autoptimize wird das CDD im head verlinkt, was ein sicherer Standard ist, aber Google PageSpeed Insights beschwert sich darüber. Du kannst dir „Gesamten CSS-Code Inline einfügen“ oder „CSS-Code inline einfügen und verschieben“ näher ansehen, welche auch in dieser FAQ erklärt werden.

Was ist der Nutzen von „inline oder verzögertem CSS“?

CSS sollte üblicherweise im Head des Dokumentes stehen. Seit kurzem empfiehlt unter anderem Google das verzögerte Ausliefern von nicht-essentiellem CSS, während die Styles inline benötigt werden, um die Seite „above the fold“ aufzubauen. Dies ist besonders wichtig, um Seiten auf Mobilgeräten so schnell wie möglich zu rendern. Seit Autoptimize 1.9.0 ist das leicht; wähle „Inline und Defer CSS“, kopiere den „above the fold“-Block in das Eingabefeld (Textfeld) und du kannst loslegen!

Aber wie finde ich heraus was das „above the fold CSS“ ist?

Es gibt keine einfache Lösung, weil der Bereich „above the fold“ von der Bildschirmgröße abhängt. Es gibt trotzdem verfügbare Tools, die versuchen herauszufinden, was „above the fold“ ist. Diese Liste von Tools ist ein guter Startpunkt. Der Sitelocity critical CSS generator und Jonas Ohlsson’s criticalpathcssgenerator ist eine gute Grundlösung und http://criticalcss.com/ ist eine Premium-Lösung desselben Jonas Ohlsson. Alternativ kann auch dieses Bookmarklet (nur für Chrome) hilfreich sein.

Oder sollte man alles CSS inline setzen?

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.

Mein Cache wird riesig, leert Autoptimize nicht den Cache?

Autoptimize hat keinen wirksamen Mechanismus für das Leeren des Caches, da dies auch optimiertes CSS/JS entfernen könnte, worauf sich andere Caches noch beziehen, was deine Website unbrauchbar machen würde. Außerdem ist ein schnell wachsender Cache ein Anzeichen für andere zu vermeidende Probleme.

Du kannst die Cachegröße stattdessen auf einem akzeptablen Wert halten entweder durch:

  • Abschalten der Optionen „Inline JS zusammenfügen“- und/oder „Inline CSS zusammenfügen“
  • Ausschluß von JS-Variablen (oder manchmal CSS-Selektoren), welche sich pro Seite ändern (oder Seitenladevorgang). Du erfährst, wie du das tun kannst, in diesem Blog-Beitrag.

Abgesehen von den oben geäußerten Bedenken gibt es Drittanbieter-Lösungen, um den AO-Cache automatisch zu leeren, z. B: diesen Code oder dieses Plugin, aber aus den genannten Gründen solltest du diese nur einsetzen, wenn du wirklich weißt, was du tust.

„Cache leeren“ scheint nicht zu funktionieren?

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.

My site looks broken when I purge Autoptimize’s cache!

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.

Kann ich weiterhin den Rocket Loader von Cloudflare benutzen?

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

Was kann ich mit der API anfangen?

Eine ganze Menge, es gibt Filter, die du benutzen kannst, um Autoptimize auf Anfrage zu deaktivieren, die CSS- und JS-Ausschlüsse zu ändern, die Grenze für das Inlining für CSS background-Bilder zu ändern, zu definieren, welche JS-Dateien hinter die zusammengefügten geschoben werden, das defer-Attribut der zusammengefügten JS-Skript-Tags zu ändern, … Es gibt Beispiele für einige Filter in der autoptimize_helper.php_example und in diesen FAQ.

Wie funktioniert ein CDN?

Seit Version 1.7.0 ist CDN aktiviert sobald das CDN Stammverzeichnis eingegeben wurde (z.B. http://cdn.example.net/wordpress/). Falls dieser URL vorliegt, wird er für alle von Autoptimize generierten Dateien benutzt (z.B. verknüpftes CSS und JS), inklusive Hintergrundbilder innerhalb von CSS (falls du nicht data-uri’s benutzt).

Falls deine hochgeladenen Bilder ebenso auf dem CDN liegen sollen, kannst du den upload_url_path deiner WordPress Konfiguration (/wp-admin/options.php) zum CDN-Upload-Zielverzeichnis ändern (z.B. http://cdn.example.net/wordpress/wp-content/uploads/). Bedenke dass dies nur für Bilder funktioniert die von da an hochgeladen werden, nicht für bereits hochgeladene Bilder. Danke an BeautyPirate für den Tipp!

Warum werden meine Fonts nicht per CDN ausgeliefert?

Autoptimize unterstützt das, aber es ist nicht standardmäßig aktiv, weil nicht lokale Fonts evtl eine extra Konfiguration benötigen. Aber wenn deine cross-origin Anfrage Strategie in Ordnung ist, kannst du Autoptimize anweisen die Fonts dem CDN hinzuzufügen durch Hook in die API, durch Setzen von autoptimize_filter_css_fonts_cdn auf true auf folgende Art;

add_filter( 'autoptimize_filter_css_fonts_cdn', '__return_true' );

Ich nutze Clouflare, was sollte ich als CDN-Stammverzeichnis eingeben?

Nichts, wenn du bei Cloudflare bist, ist dein autoptimiertes CSS/JS bei Cloudflare automatisch auf dem Cloudflare-CDN.

Wie kann ich erzwingen, dass die zusammengefügten Dateien statisches CSS oder JS anstelle von PHP sind?

Falls dein Webserver ordentlich konfiguriert ist, um mit Kompression (gzip oder deflate) und cache expiry (Expire und Cache-Steuerung mit ausreichender Cache-Möglichkeit) umzugehen, brauchst du Autoptimize nicht, um das für dich zu regeln. In diesem Fall kannst du die „Zusammengefügte CSS / Skript-Dateien als statische Dateien speichern?“-Option wählen, welche Autoptimize zwingt, die zusammengefügten Dateien als .css und .js-Dateien zu speichern (das bedeutet es wird kein PHP benötigt um diese Dateien auszuliefern). Diese Einstellung ist der Standard seit Autoptimize 1.8.

Wie funktioniert das „Ausschliessen von der Optimierung“?

Sowohl CSS- wie auch JS-Optimierung kann Code von der Zusammenführung und Minimierung auslassen, durch Hinzufügen von „Identifikatoren“ zu der Komma getrennten Ausschlussliste. Die exakte Identifizierungszeichenfolge kann auf folgende Arten bestimmt werden:

  • Falls du nur eine spezifische Datei ausschliessen willst, z.B. wp-content/plugins/funkyplugin/css/style.css, kannst du einfach „funkyplugin/css/style.css“ ausschliessen
  • Falls du alle Dateien eines bestimmten Plugins ausschliessen möchtest, z.B. wp-content/plugins/funkyplugin/js/*, kannst du z.B. „funkyplugin/js/“ oder „plugins/funkyplugin“ ausschliessen
  • Falls du inline code ausschliessen möchtest, musst du eine spezifischen, einzigartige Zeichenfolge in diesem Teil des Codes finden und diesen zu der Ausschlussliste hinzufügen. Beispiel: Um <script>funky_data='Won\'t you take me to, Funky Town'</script> auszuschliessen, wäre der Identifikator „funky_data“.

Problembehandlung zu Autoptimize

Sieh dir die Anleitung zur Fehlerbehebung auf https://blog.futtta.be/2022/05/05/what-to-do-when-autoptimize-breaks-your-site/ an.

I excluded files but they are still being autoptimized?

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

Hilfe, ich erhalte eine weiße Seite oder einen „internal server error“ nach dem Aktivieren von Autoptimize!

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.

Aber ich habe immer noch leere autoptimierte CSS oder JS-Dateien!

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.

Can’t log in on domain mapped multisites

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:

define( 'AUTOPTIMIZE_SETUP_INITHOOK', 'setup_theme' );

Ich bekomme keinen Fehler, aber meine Seiten sind überhaupt nicht optimiert?

Autoptimize macht einige Tests, bevor es tatsächlich optimiert. Wenn eine der folgenden Bedingungen zutrifft, werden deine Seiten nicht optimiert:

  • wenn im Customizer
  • falls es keinen öffnenden <html-Tag gibt
  • if there is <xsl:stylesheet in the response (indicating the output is not HTML but XML)
  • if there is <html amp in the response (as AMP-pages are optimized already)
  • if the output is an RSS-feed (is_feed() function)
  • if the output is a WordPress administration page (is_admin() function)
  • if the page is requested with ?ao_noptimize=1 appended to the URL
  • if code hooks into Autoptimize to disable optimization (see topic on 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 und ähnliche Page Builder Lösungen sind defekt!!

Deaktiviere diese Option, damit Autoptimize für angemeldete Benutzer aktiv ist und leg los mit „Draggen und Droppen“ 😉

Hilfe, das Bezahlen in meinem Shop funktioniert nicht mehr!!

Deaktiviere diese Option, um die Warenkorb- oder Checkout-Seiten (funktioniert mit WooCommerce, Easy Digital Downloads und WP eCommerce) zu optimieren.

Revolution Slider läuft nicht mehr!

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

Ich erhalte Fehler „jQuery is not defined“-Fehler

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.

Ich nutze NextGen Galleries und eine Menge JS ist nicht zusammengeführt/ minimiert?

NextGen Galleries tut raffinierte Dinge, um JavaScript hinzuzufügen. Damit Autoptimize in der Lage ist, dies trotzdem zusammenzufassen, kannst du entweder Nextgen Gallerys Ressourcen-Verwaltung mit diesem Codeschnipsel abschalten: add_filter( 'run_ngg_resource_manager', '__return_false' );. Oder du kannst Autoptimize an einem früheren Punkt starten, indem du diesen Code zu deiner wp-config.php hinzufügst: define("AUTOPTIMIZE_INIT_EARLIER","true");

Was ist 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-->

Du kannst das im Inhalt einer Seite/Beitrag tun, in Widgets und in deinen Theme-Dateien (Bedenke das Erstellen eines Child Themes, um zu verhindern, dass deine Änderungen durch Theme Updates überschrieben werden).

Kann ich den Ordner & Dateinamen der gecachten Autoptimize Dateien ändern?

Ja, falls du Dateien von z.B. /wp-content/resources/aggregated_12345.css anstelle von standardmässig /wp-content/cache/autoptimize/autoptimize_12345.css ausliefern möchtest, dann ergänze folgendes zu der wp-config.php:

define('AUTOPTIMIZE_CACHE_CHILD_DIR','/resources/');
define('AUTOPTIMIZE_CACHEFILE_PREFIX','aggregated_');

Funktioniert das auch mit nicht standardmäßiger WP_CONTENT_URL?

Nein, Autoptimize unterstützt standardmäßig keine WP_CONTENT_URL, aber mit ein paar Zeilen Code, der sich in die API von Autoptimize einklinkt, kann dies erreicht werden.

Kann das erzeugte JS/CSS mit gzip vorkomprimiert werden?

Ja, doch das ist standardmäßig deaktiviert. Du kannst es aktivieren durch die Übergabe von ´true´ an ´autoptimize_filter_cache_create_static_gzip´. Du musst offenbar auch deinen Webserver für die Benutzung dieser Dateien anstelle der nicht komprimierten konfigurieren, um die Zusatzlast durch on-the-fly-Komprimierung zu verhindern.

Was bewirkt „Emojis entfernen“?

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.

Ist „Abfrage-Zeichenfolgen entfernen“ nützlich?

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.

(Wie) sollte ich Google Fonts optimieren?

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

Sollte ich „preconnect“ benutzen?

Preconnect is a somewhat advanced feature to instruct browsers (if they support it) 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.

When can(‚t) I async JS?

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.

How does image optimization work?

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.

Can I use image optimization for my intranet/ protected site?

No; Image optimization depends on the ability of the external image optimization service to fetch the original image from your site, optimize it and save it on the CDN. If you images cannot be downloaded by anonymous visitors (due to firewall/ proxy/ password protection/ hotlinking-protection), image optimization will not work.

Wo kann ich weitere Informationen zur Bildoptimierung erhalten?

Have a look at Shortpixel’s FAQ.

Can I disable AO listening to page cache purges?

As from AO 2.4 AO „listens“ to page cache purges to clear its own cache. You can disable this behavior with this filter;

add_filter('autoptimize_filter_main_hookpagecachepurge','__return_false');

Some of the non-ASCII characters get lost after optimization

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;

add_filter('autoptimize_filter_main_use_mbstring', '__return_true');

Ich bekomme Critical-CSS nicht zum Laufen

Check the FAQ on the (legacy) „power-up“ here, this info will be integrated in this FAQ at a later date.

Do I still need the Critical CSS power-up when I have Autoptimize 2.7 or higher?

Nein, das Critical CSS Power-Up wird nicht mehr benötigt. Alle Funktionen (und viele Korrekturen/Verbesserungen) sind jetzt Teil von Autoptimize.

Was macht „Aktiviere 404-Fallbacks“? Wozu brauche ich es?

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

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

Wenn diese Option eingeschaltet ist, fügt Autoptimize ein ErrorDocument 404 zur .htaccess-Datei hinzu (wird von Apache-Servern genutzt) und schaltet sich außerdem in den WordPress-Hook template_redirect, um 404’s abzufangen, die von WordPress bearbeitet werden. Wenn du NGINX nutzt, sollte das unten Stehende helfen (ich bin kein NGINX-Spezialist, aber es funktioniert zumindest bei mir);

location ~* /wp-content/cache/autoptimize/.*\.(js|css)$ {
    try_files $uri $uri/ /wp-content/autoptimize_404_handler.php;
}

Und hier eine nette alternative Herangehensweise (bereitgestellt von fboylovesyou);

location ~* /wp-content/cache/autoptimize/.*\.(css)$ {
    try_files $uri $uri/ /wp-content/cache/autoptimize/css/autoptimize_fallback.css;
}
location ~* /wp-content/cache/autoptimize/.*\.(js)$ {
    try_files $uri $uri/ /wp-content/cache/autoptimize/js/autoptimize_fallback.js;
}

What open source software/ projects are used in Autoptimize?

Die folgenden tollen Open-Source-Projekte werden in Autoptimize in der einen oder anderen Form verwendet:

Wo bekomme ich Hilfe?

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.

Ich will raus, wie sollte ich Autoptimize entfernen?

  • Deaktiviere das Plugin (dies wird alle Einstellungen und den Cache löschen)
  • Entferne das Plugin
  • Lösche jeden Cache der sich evtl. auf Seiten mit Autoptimiertem CSS/JS bezieht (z.B. die eines Caching Plugins wie WP Super Cache)

Wie kann ich helfen/mich beteiligen?

Erstelle einfach einen „Fork“ für Autoptimize auf Github und programmiere los!

Rezensionen

19. Februar 2024 1 Antwort
With Autoptimize the performance of my websites improves and in case of problems their assistance is very helpful.
12. Februar 2024 1 Antwort
Not that much to add. It's simply the best (free) plugin to optimize and speed up your website. It works well and has a lot of feature to go deeper and optimize even more. Plus: the support here on the wordpress.org forum is one of the best out here. Keep up the good work!
2. Februar 2024 1 Antwort
I was having a plugin conflict because of an unrelated plugin and the Autoptimize plugin author was extremely quick to reply to my support thread and help me work out an extensive series of steps to best optimize the website and work around this conflict. I deeply appreciated this selfless support that went above and beyond any initial expectations. I am happy to have Autoptimize working and speeding things up!
Alle 1.402 Rezensionen lesen

Mitwirkende & Entwickler

„Autoptimize“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:

Mitwirkende

„Autoptimize“ wurde in 32 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Autoptimize“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.

Änderungsprotokoll

3.1.11

3.1.10

  • 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.
  • improvement: show option to disable the default on „compatibility logic“.
  • fix for regression in 3.1.9 which caused JetPack Image optimization not working even if image optimization was off in AO.
  • API: some extra hooks in critical CSS to enable others (and AOPro) to act on changes in critical CSS rules
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.9

  • improvement: activate JS, CSS & HTML optimization upon plugin activation (hat tip to Adam Silverstein (developer relations engineer at Google))
  • 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)
  • improvement: exclude images from being lazyloaded if they have fetchpriority attribute set to high (as done by WordPress core since 6.3)
  • bugfix: disable spellcheck on CSS textarea’s (above the fold CSS/ critical CSS) which in some cases caused browser issues
  • add tab to explain Autoptimize Pro.
  • confirmed working with WordPress 6.4 (beta 3)
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.8.1

  • urgent fix for PHP error, sorry about that!

3.1.8

  • Images: improve optmization logic for background images
  • Critical CSS: don’t trigger custom_post rule if not is_singular + adding debug logging for rule selection
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.7

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

3.1.6

  • CSS: removing trailing slashes in <link tags for more W3 HTML validation love
  • Extra: also dequeue WooCommerce block CSS if „remove WordPress block CSS“ option is active
  • imgopt: also act on non-aggregated inline CSS
  • imgopt: added logic to warn users if Shortpixel can’t reach their site
  • backend: AO toolbar JS/ CSS is finally minified as well.
  • explicitly disable optimization of login pages
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.5

  • improvements to JSMin by Robert Ehrenleitner (big thanks Robert!).
  • do not consider jquery.js as minified any more (WordPress now uses jquery.min.js by default and jquery.js is the unminified version).
  • fix for „undefined array key“ PHP errors in autoptimizeCriticalCSSCron.php
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.4

  • 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).
  • Img opt: also optimize images set in data-background and data-retina attributes (+ filter to easily add other attributes)
  • CSS opt: filter to enable AO to skip minification of calc formulas in CSS (as the CSS minifier on rare occasions breaks those)
  • Multiple other filters added
  • Some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.3

  • Multiple fixes for metabox LCP image preloads (thanks Kishorchand for notifying & providing a staging environment to debug on).
  • Fix in revslider compatibility (hat tip Waqar Ahmed for reporting & helping out ).
  • No image optimization or criticalcss attempts on localhost installations any more + notification of that fact if localhost detected.
  • Some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.2

  • Google Fonts: some more removal logic
  • fix for 404 fallback bug (hat tip to Asif for finding & reporting)
  • Some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.1.1

  • Quick workaround for an autoload conflict with JetFormBuilder (and maybe other Crocoblock plugins?) that causes a critical error on the AO settings page.

3.1.1

  • 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.
  • security: further improvements to critical CSS settings page (again with the great assistance of WPScan Security).
  • some other minor changes/ improvements/ filters, see the GitHub commit log.

3.1.0

  • new HTML sub-option: „minify inline CSS/ JS“ (off by default).
  • 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).
  • security: improvements to the critical CSS settings page to fix authenticated cross site scripting issues as reported by WPScan Security.
  • 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).
  • some other minor changes/ improvements/ hooks, see the GitHub commit log

3.0.4

  • fix for „undefined array key ao_post_preload” on post/ page edit screens
  • fix for image optimization altering inline JS that contains an <img tag if lazyload is not active
  • improvements to exit survey
  • confirmed working with WordPress 6.0

3.0.3

  • fix for images being preloaded without this being configured when lazyload is on and per page/post settings are off.
  • ensure critical CSS schedule is always known.
  • when deferring non-aggregated JS, make the optimatization exclusions take the full script-tag into account instead of just the src URL.

3.0.2

  • 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'); .
  • fix for „Call to undefined method autoptimizeOptionWrapper::delete_option()“ in autoptimizeVersionUpdatesHandler.php

3.0.1

  • fix for minification of inline script with type text/template breaking the template (e.g. ninja forms), hat tip to @bobsled.
  • 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!

3.0.0

  • 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)
  • new: no API needed any more to create manual critical CSS rules.
  • new: „Remove WordPress blocks CSS“ option on the „Extra“ tab to remove block- and global styles (and SVG).
  • 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)
  • new: configure an image to be preloaded on a per page/ post basis for better LCP.
  • improvement: defer inline now also allowed if inline JS contains nonce or post_id.
  • improvement: settings export/ import on critical CSS tab now takes into account all Autoptimize settings, not just the critical CSS ones.
  • technical improvement: all criticalCSS classes were refactored, removing use of global variables.
  • technical improvement: automated unit tests on Travis-CI for PHP versions 7.2 to 8.1.
  • fix: stop Divi from clearing Autoptimize’s cache which is pretty counter-productive.
  • misc smaller fixes/ improvements, see the GitHub commit log

older