Inasync-javascript is a WordPress plugin which enables you to load non-blocking JavaScript files (ex. jQuery library) with Async and Defer.
Using async or defer helps to eliminate render-blocking JavaScript in above-the-fold content. This can also help to increase your pages peed which in turn can assist in improving your page ranking.
How it works:
When a JavaScript file is loaded via the wp_enqueue_script function, Async JavaScript will add an async
or defer
attribute.
There are several ways an external JavaScript file can be executed:
- If
async
is present: The script is executed asynchronously with the rest of the page (the script will be executed while the page continues the parsing) - If
defer
is present andasync
is not present: The script is executed when the page has finished parsing - If neither
async
ordefer
is present: The script is fetched and executed immediately, before the browser continues parsing the page
Supported browsers:
- Chrome
- IE 10 and higher
- Firefox 3.6 and higher
- Safari
- Opera
How to use it:
1. Install and activate the async-javascript
plugin from your admin panel as usual.
2. Enable the async-javascript
in the settings page.
3. Select the method (async or defer) that you wish to use:
4. Specify the script(s) to Async or Defer:
5. You can also select the script, plugin and theme to ignore:
Preview:
Download WordPress Plugin:
You can download this free WordPress plugin using the download button below. Unless otherwise stated, the WordPress plugin is available under GNU General Public License.
Author: Frank Goossens
Homepage: https://wordpress.org/plugins/async-javascript/
Don’t forget to share this WordPress plugin and also check out other awesome plugins on our site.