Plugin Reviews

WP Deferred JavaScripts

Defer the loading of all JavaScripts added with `wp_enqueue_script()`, using LABJS (an asynchronous javascript library).

1 review
Average Rating
3.2 out of 5 stars
You are currently viewing the reviews that provided a rating of 4 stars. Click here to see all reviews.
Works as advertised
By , for WP 3.6.1

This is the very first plugin that managed to load my scripts asynchronously, without breaking my site.

All I had to do was to exclude 'jquery' and 'cycle' from deferral, in my functions.php of my child-theme...

function scripts_to_not_defer(){
	return array('jquery', 'cycle');

due to a slider plugin I'm using.

I took off one star because of 2 things:

  1. No back-end settings (e.g. for the exclusions).
  2. It forcefully appends query strings with the current wp version at the url of the scripts.

The second one is not a biggie, but it hurts the GTmetrix PageSpeed ratings.

It can be easily fixed though by replacing...

$ver = ( ! empty( $wp_scripts->registered[ $d ]->ver ) ) ? $wp_scripts->registered[ $d ]->ver : get_bloginfo( 'version' );


$ver = ( ! empty( $wp_scripts->registered[ $d ]->ver ) ) ? $wp_scripts->registered[ $d ]->ver : null;

That is: null instead of get_bloginfo( 'version' )

Please also note, that the line to be fixed appears twice inside the plugin's php file.

I haven't tested the plugin extensively, but I'm quite happy I finally found one that works.

You must log in to submit a review. You can also log in or register using the form near the top of this page.