This topic has 4 replies, 2 voices, and was last updated 7 years, 5 months ago ago by Laranz
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
Hi,
What if you remove the code you added to defer parsing JS? Did the site speed back to 5-6 seconds from the 54seconds?
PS: The article you’re trying is 3years old, and the filter used in that clear_url is also deprecated. So try some new solution or try using any Cache plugin, that will help you to reduce loading time, instead tackling each issue separately.
Let us know,
Thanks,
laranz.
When I remove the code and rescan the site its back to 5-6 seconds. I tried a plugin on the site but it slows it down to around 12-13 seconds.
I have attached the link to the report to see what you can recommend on speeding up this.
I activated TwentySeventeen theme and ran GTMetrix and it loaded in 1.7seconds, I switch back to Royal and GT Metrix jumps up 12.7seconds.
Hi,
I tried now and it says 6seconds, TwentySeventeen has low loading rates because it is not a multipurpose WordPress theme, my suggestion is to try some CDN ( optional 0 and also a good Cache plugin, that will resolve most of the issue you’re telling. Please try a cache plugin and wait for sometime to see the speed effects.
Let us know,
Thanks,
laranz.
You must be logged in to reply to this topic.Log in/Sign up