Ready to get started?Download WordPress

Plugin Directory

WP Deferred Javascripts

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


  1. Upload the WP Deferred Javascripts plugin to your blog and Activate it.
  2. Enjoy ^^

Exclude Scripts

Release 1.5.6 provide a new filter hook named do_not_defer which take an array of script's handle as argument. Theses script will not be deferred.

Defer inline scripts execution

New release 1.5.6 provide another filter hook named wdjs_before_end_lab which take a string of javascript code as argument. Code will be call add the end of LabJS enqueue, calling one function or more.

For exemple :

function load_my_js_code_after_loading() {
    return '.wait(function(){alert 'loaded';anInlineFunction();})';
add_filter( 'wdjs_before_end_lab', 'load_my_js_code_after_loading' );

Adding this will execute anInlineFunction() and print 'Loaded' after all my scripts have been loaded :-)

Using other plugins hook, you can wrap JS inline code into a function, and call this function with load_my_js_code_after_loading...

Requires: 3.0 or higher
Compatible up to: 3.5.2
Last Updated: 2013-5-19
Downloads: 11,337


4 stars
4.1 out of 5 stars


1 of 2 support threads in the last two months have been resolved.

Got something to say? Need help?


Not enough data

0 people say it works.
0 people say it's broken.

100,2,2 100,1,1 100,2,2 100,2,2 100,3,3 0,1,0 75,4,3 50,2,1 67,3,2 67,3,2 100,1,1