Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

Farlif on "Add "async" by script-loader.php"

$
0
0

Hi,

loading times become more important every day. Therefore I'd like to load the jQuery.js in the header with an "async"-tag. The registration of the jQuery is done by wp-include/script-loader.php:

// jQuery
	$scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ), '1.10.2' );
	$scripts->add( 'jquery-core', '/wp-includes/js/jquery/jquery.js', array(), '1.10.2' );

Now, I am not so skilled in writing php, and I don't know where and how to tell the script to load jQuery with "async". Any hints for me?

Cheers,
Stefan


Viewing all articles
Browse latest Browse all 8245

Trending Articles