To speed up the download time for my site on slow connections, it has been suggested to defer parsing of JS, how do I do this?
I have 3 different bits of script.
The first bit on the page is needed every time it gets loaded, but it is fine if that is done as the very last item.
<!-- Start of StatCounter Code -->
<div class="statcounter"><a class="statcounter" title="joomla counter"
alt="Boiler repairs south london counter"
src="http://c.statcounter.com/6170797/0/4187b1bb/0/"></a></div></noscript><!-- End of StatCounter Code -->
The second bit would also be fine if done as the last item.
var _gaq = _gaq || ;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script'); s.parentNode.insertBefore(ga, s);
The last bit which is the "Google+ button" is only used infrequently, and would not be needed at all in most cases and would ideally not be read/loaded until it was actually called for.
<!-- Place this tag where you want the +1 button to render --><g:plusone></g:plusone>
Q1. Does the deferring always use the same system?
Q2. Where do I go start learning the ins and outs of deferring JS?