slow-loading javascript include blocks rest of site
<p>I have a site with a third-party Javascript include coming from an external URL. However, it frequently loads very slowly (if at all). It is a tracking service used by our marketing team, so I can't remove it (I have suggested it!).</p>

<p>Currently it's included at the end of my page template with a very simple</p>

<pre><code>&lt;script src='http://remoteurl/'&gt;&lt;/script&gt;
</code></pre>

<p>All the other scripts on the page wait until it has loaded before executing anything, meaning that any JS widgets I'm using don't work until it loads. If it times out, they never run.</p>

<p>So the performance problems of an external site are causing issues on for our site.</p>

<p>The frustrating thing about it is that the site doesn't need this script to load for everything else to function. So is there a way to load it such that it doesn't block the rest of the site's scripts from running if it fails?</p>

<p>(I've tried the defer attribute, but although this affects the execution sequence, it doesn't change the fact that everything has to load before anything happens)</p>

<p>Thanks for any advice.</p>
