Using non-blocking scripts
<p>The more i use JavaScript the more i try to come up with efficient ways of loading and executing my scripts.
One method i have found to be really useful is loading javascript without blocking. </p>

<pre><code>function include_js(url) { 
    var script = document.createElement("script");
    script.type = "text/javascript";
    script.src = url;
    document.getElementsByTagName("head")[0].appendChild(script);
}

include_js('script.js');
</code></pre>

<p>JavaScript also has a window method that executes when the page has loaded.</p>

<pre><code>window.onload = function() {
 alert('Script executed onload');
};
</code></pre>

<p>What i want to know is, how does the browser treat script executed by the window.onload method, is it blocking or non-blocking script?</p>
