Asynchronous And Deferred JavaScript Loading In WordPress – async-javascript

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 and async is not present: The script is executed when the page has finished parsing
  • If neither async or defer 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.

async-javascript Enable

3.  Select the method (async or defer) that you wish to use:

async-javascript Method

4. Specify the script(s) to Async or Defer:

async-javascript Select Scripts

5. You can also select the script, plugin and theme to ignore:

async-javascript Ignore



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


Don’t forget to share this WordPress plugin and also check out other awesome plugins on our site.

Rate This Plugin
User Review
5 (1 vote)