No 3rd party javascript code in header

If you place third party javascript codes in your HTML head, you are effectively giving up control of site at the mercy of the third party. Your site will not load if the third party server is no-responsive or simply dead.

With exception of Google, which you don’t expect it to go offline (also you are required to do so), third party javascript codes should be in the footer.

One of our sites once trial-tested a free theme which used a third party javascript hosted with a CDN. One morning, the site just stopped dead trying to load the javascript. The story was that the CDN server name has been changed as the said CDN company was acquired by a larger company. The good thing was the site was still in development and with further investigation, we ended up using a CDN ourselves. But this should not be happening to your site. Period.

Web browsers download page elements in the order that they are listed in your HTML – CSS, javascript, and images (mostly). If the domain that any of those are hosted on is offline or going slow, a web browser will “hang” for up to 60 seconds while it waits for the item to load, before moving on to the next item. (Asynchronous javascript is an exception but that’s still not very common – although we do offer it an option – but again, that’s not the point. And besides, if you’re loading it asynchronously, you’re not depending on it being available for immediate execution, so what would be the point of putting it in your HTML head?).

If you have third party javascript in your HTML head and that third party server goes offline, your web site is effectively dead because nothing else is going to load for up to 60 seconds. When I visit sites that hang like that, I immediately close them as I’m sure 99% of people do.

Source: getclicky

http://getclicky.com/blog/305/please-do-not-place-third-party-javascript-in-your-html-head