AddThis

Welcome, Guest Sign In

Speed of dynamically loaded javascripts

webelsolar Apr 25, 2012 02:45PM EDT

The main widget Javascript is dynamically loading additional javascripts:
http://s7.addthis.com/static/r07/menu-ab011.js
http://s7.addthis.com/static/r07/menu106.js
http://s7.addthis.com/static/r07/lang16/de.js
http://s7.addthis.com/static/r07/core004.js
http://ds.addthis.com/red/psi/sites/www.webelsolar.de/p.json?...

1) If tested with a page speed tool, it could be much better combining these calls in one single call. There are different solutions:
a) with a loader script or an autoloader like known from yui or jquery. Unfortunately these use parameters in the filename (addthis.js?menux&core004.., this could have drawbacks on caching and proxies).
b) Preferred will be a minified and combined version in one file.
2) Did you think about delivering gzipped versions? This could save more traffic.
3) The dynamic files are added at the topmost point in the head. I did not test this in terms of speed an compatibility:
a) if used, the X-UA-Compatible should be the first tag in the head if used in IE.
b) The regular recommendation of tools like google page speed or yslow is to place js at the bottom.

Post Your Public Answer

Your name (required)
Your email address (required)
Answer (required)

Still need help?


General Topics

 

Reference