I’ve been testing out various changes on my site because on average it’s loading around 6-8 seconds so I am trying to lower it.
GT Metrix suggests defer parsing of javascript so I used this;
http://www.laplacef.com/2014/05/24/how-to-defer-parsing-javascript-in-wordpress/
// Defer jQuery Parsing using the HTML5 defer property
if (!(is_admin() )) {
function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
// return "$url' defer ";
return "$url' defer onload='";
}
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
}
My load time suddenly began 54 seconds, can you please look at my site and see if you can figure out what is wrong with it