WordPress.org

Ready to get started?Download WordPress

Plugin Reviews

WP Deferred Javascripts

Defer the loading of all javascripts added with wp_enqueue_scripts, using LABJS (an asynchronous javascript library).

7 reviews
Average Rating
4 stars
4 out of 5 stars
5 stars
Excellent
By ,

Temps d'affichage nettement amélioré !
Et d'un point de vu utilisateur ça n'a pas de prix !

5 stars
Good
By , for WP 3.8

It eliminates render-blocking JavaScript for google PageSpeed

2 stars
Works, but no effect on JS load times
By ,

What would really be useful is if WP had an option to register scripts with an option to set the defer/async attributes within the script HTML tag:

http://www.w3schools.com/tags/att_script_defer.asp

4 stars
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...

add_filter('do_not_defer','scripts_to_not_defer');
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' );

with...

$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.

5 stars
Plugin indispensable
By , for WP 3.5.2

Temps de chargement divisé par deux.
Merci...

2 stars
Not working after 1.1
By , for WP 3.5.1

Updates are frequent and annoying. Defer parsing of JavaScript problem was fixed in version 1.0 of this plugin. Now starting from 1.1 to 1.5.2 the problem persists. What a waste.

Should have never updated.

5 stars
Excellent
By , for WP 3.5.1

Bon boulot. Merci.

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