Enable Async Javascript |
| When you enable Async Javascript, when a script is loaded via the 'wp_enqueue_script' method, this plugin will add a 'async' or 'defer' attribute. |
| This action helps to eliminate render-blocking JavaScript in above-the-fold content. This can also help to increase your pagespeed which in turn will assist in improving your page ranking. |
There are several ways an external script 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 async is not present and defer is 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
|
| Note: There have been instances where enabling Async Javascript has 'broken' the javascript delivery. Should this happen to you, I highly recommend installing the Autoptimize plugin which will combine your javascript, further enhancing pagespeed and eliminating this issue. |
|
/> |