This plugin optimize page rendering of WordPress theme.
loading="lazy"
or loading="eager"
with your images.defer
or async
attributes to your scripts.rel="preload"
to your stylesheets. Polyfill for old browsers is also available.All of above are selectable and you can customize with white list.
If you wish header logo(.custom-logo
) and main post thumbnail(.post-feature-image
) should be load faster because they are in first view.
Just put custom-logo,post-feature-image
at High Priority section in your setting screen.
Defering JavaScripts sometimes breaks your site.
For example, if a script requires just in time operation with inline script tag, it will fail.
<script id="some-script-js" src="somescript.js" defer></script> <script> new SomeScript(); </script>
To avoid this, Add some-script
handle name in Deny Defer section in your setting screen.
Generally speaking, many JavaScripts loaded in your WordPress are issued by WordPress Core, plugins, themes, your custom code, and so on.
To optimize JavaScript loading, try and error approaches works fine.
rel="preload" attributes makes your stylesheets loaded asynchrounsely, but FOUC(Flush of Unstyled Content) happens.
To avoid this, include critical CSS to Deny List in your setting screen. Critical CSS are generally your theme’s main stylesheet.