WebPagetest Forums
where is the java script - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: where is the java script (/showthread.php?tid=13555)



where is the java script - liguolong - 02-20-2015 08:04 PM

Hi, I am new to website building. It looks like my website http://www.androiddreamer.com has a lot javascript which slows down. I am not sure where is the script situated and what can I do to improve it.


RE: where is the java script - alien_ - 02-23-2015 08:38 AM

Looks like you're using Wordpress, so you might be able to speed it up automatically by using some of these plugins: http://premium.wpmudev.org/blog/10-plugins-to-make-wordpress-blazing-fast/


RE: where is the java script - ajm_76 - 02-23-2015 10:35 PM

(02-20-2015 08:04 PM)liguolong Wrote:  Hi, I am new to website building. It looks like my website http://www.androiddreamer.com has a lot javascript which slows down. I am not sure where is the script situated and what can I do to improve it.

Hi liguolong,

The site isn't optimized very well but JavaScript is not the primary problem (since it is being deferred).

Slider Revolution's captions.php?rev=4.3.8 file is pushing DOM Content Loaded out to around 14 seconds (on average), which means that Google's .woff files for the Web fonts you're using are not being applied until then, after DOM content is fully present. This explains some of the strange-looking loading behavior.

You have a few different options:
1.) You don't appear to actually be using Revolution Slider so you could disable it;
2.) You could stuff all of the necessary .woff files into the browser as a subresource (Chrome; "prefetch" for Firefox), thereby making those files available prior to DOM Content Loaded (assuming, of course, that the browser takes the hint). Doing this will not really improve the site's Document Complete or Fully Loaded times, but will appear to for the end user.
3.) Instead of using the "defer" attribute on your JavaScript files, you could try "async" which will bring DOM Content Loaded much closer to the first paint thereby applying Google's .woff files sooner. "Async" may break things, however.

There are quite a few more issues, but fixing the above will do a lot.

Best,
AJ
Managing Partner
WpFASTER