<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Non-blocking JavaScript Downloads</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/2008/07/22/non-blocking-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Thu, 09 Feb 2012 01:46:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
	<item>
		<title>By: Thomas Glock</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-588289</link>
		<dc:creator>Thomas Glock</dc:creator>
		<pubDate>Tue, 16 Feb 2010 22:21:34 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-588289</guid>
		<description>var js = document.createElement(&#039;script&#039;);
script.src = &quot;something.js&quot;;
var head = document.getElementsByTagName(&#039;head&#039;)[0];
head.appendChild(js);

Does this technique work with IE8 ?  I&#039;ve had success using this for some time with FF, Chrome and IE6 but onload event is not firing for IE8... 

The request is sent and valid data comes back - including a document.domain = &#039;...&#039; 

Any special considerations for IE8 ?</description>
		<content:encoded><![CDATA[<p>var js = document.createElement(&#8216;script&#8217;);<br />
script.src = &#8220;something.js&#8221;;<br />
var head = document.getElementsByTagName(&#8216;head&#8217;)[0];<br />
head.appendChild(js);</p>
<p>Does this technique work with IE8 ?  I&#8217;ve had success using this for some time with FF, Chrome and IE6 but onload event is not firing for IE8&#8230; </p>
<p>The request is sent and valid data comes back &#8211; including a document.domain = &#8216;&#8230;&#8217; </p>
<p>Any special considerations for IE8 ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-583252</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Wed, 05 Aug 2009 22:45:02 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-583252</guid>
		<description>Gah - html got eaten -&gt; trying again

Stoyan - I&#039;ve seen an interesting limitation to the non-blocking JS technique.  It turns out that in FF 3+, the &quot;attach a script to the head&quot; technique is only non-blocking until you run into another script tag from within the HTML - even if it only contains inline javascript.  See the following example.
&lt;code&gt;
[head]
[script]
    var js = document.createElement(&#039;script&#039;);
    script.src = &quot;something.js&quot;;
    var head = document.getElementsByTagName(&#039;head&#039;)[0];
    head.appendChild(js);
[/script]
[\head]
[body]
    [img src=&quot;A.gif?1&quot;]
    [img src=&quot;A.gif?2&quot;]
    [img src=&quot;A.gif?3&quot;]
        [script][/script]
    [img src=&quot;A.gif?4&quot;]
    [img src=&quot;A.gif?5&quot;]
    [img src=&quot;A.gif?6&quot;]

[/body]
&lt;/code&gt;

the external script(s) will load in parallel with images 1-3, but FF will block once you reach the empty script tag until the external scripts are done loading.</description>
		<content:encoded><![CDATA[<p>Gah &#8211; html got eaten -&gt; trying again</p>
<p>Stoyan &#8211; I&#8217;ve seen an interesting limitation to the non-blocking JS technique.  It turns out that in FF 3+, the &#8220;attach a script to the head&#8221; technique is only non-blocking until you run into another script tag from within the HTML &#8211; even if it only contains inline javascript.  See the following example.<br />
<code><br />
[head]<br />
[script]<br />
    var js = document.createElement('script');<br />
    script.src = "something.js";<br />
    var head = document.getElementsByTagName('head')[0];<br />
    head.appendChild(js);<br />
[/script]<br />
[\head]<br />
[body]<br />
    [img src="A.gif?1"]<br />
    [img src="A.gif?2"]<br />
    [img src="A.gif?3"]<br />
        [script][/script]<br />
    [img src="A.gif?4"]<br />
    [img src="A.gif?5"]<br />
    [img src="A.gif?6"]</p>
<p>[/body]<br />
</code></p>
<p>the external script(s) will load in parallel with images 1-3, but FF will block once you reach the empty script tag until the external scripts are done loading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-583251</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Wed, 05 Aug 2009 22:43:03 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-583251</guid>
		<description>Stoyan - I&#039;ve seen an interesting limitation to the non-blocking JS technique.  It turns out that in FF 3+, the &quot;attach a script to the head&quot; technique is only non-blocking until you run into another script tag from within the HTML - even if it only contains inline javascript.  See the following example.
&lt;code&gt;


    var js = document.createElement(&#039;script&#039;);
    script.src = &quot;something.js&quot;;
    var head = document.getElementsByTagName(&#039;head&#039;)[0];
    head.appendChild(js);



    
    
    
        
    
    
    


&lt;/code&gt;

the external script(s) will load in parallel with images 1-3, but FF will block once you reach the empty script tag until the external scripts are done loading.</description>
		<content:encoded><![CDATA[<p>Stoyan &#8211; I&#8217;ve seen an interesting limitation to the non-blocking JS technique.  It turns out that in FF 3+, the &#8220;attach a script to the head&#8221; technique is only non-blocking until you run into another script tag from within the HTML &#8211; even if it only contains inline javascript.  See the following example.<br />
<code></p>
<p>    var js = document.createElement('script');<br />
    script.src = "something.js";<br />
    var head = document.getElementsByTagName('head')[0];<br />
    head.appendChild(js);</p>
<p></code></p>
<p>the external script(s) will load in parallel with images 1-3, but FF will block once you reach the empty script tag until the external scripts are done loading.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stoyan</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-511215</link>
		<dc:creator>Stoyan</dc:creator>
		<pubDate>Mon, 10 Nov 2008 16:28:26 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-511215</guid>
		<description>Hi Russell, it&#039;s the YUI GET utility that&#039;s doing the loop, you only need to call it passing an array:

&lt;code&gt;YAHOO.util.Get.script(urls);&lt;/code&gt;

Here &lt;code&gt;urls&lt;/code&gt; is an array. You may be confused by the bracket notation used to define an array in JavaScript (called &quot;array literal notation&quot;).

This:
&lt;code&gt;var myarray = [1,2,3,4];&lt;/code&gt;
is the same as:
&lt;code&gt;
var myarray = new Array();
myarray[0] = 1;
//...
myarray[3] = 4;
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi Russell, it&#8217;s the YUI GET utility that&#8217;s doing the loop, you only need to call it passing an array:</p>
<p><code>YAHOO.util.Get.script(urls);</code></p>
<p>Here <code>urls</code> is an array. You may be confused by the bracket notation used to define an array in JavaScript (called &#8220;array literal notation&#8221;).</p>
<p>This:<br />
<code>var myarray = [1,2,3,4];</code><br />
is the same as:<br />
<code><br />
var myarray = new Array();<br />
myarray[0] = 1;<br />
//...<br />
myarray[3] = 4;<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: russell</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-510320</link>
		<dc:creator>russell</dc:creator>
		<pubDate>Sat, 08 Nov 2008 14:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-510320</guid>
		<description>Stoyan, I noticed the code on the 2nd example having some kind of loop. My javascript knowledge is tiny - is this some kind of way of loading multiple js files that&#039;s not covered above? It almost looks like it could loop through a few js files...</description>
		<content:encoded><![CDATA[<p>Stoyan, I noticed the code on the 2nd example having some kind of loop. My javascript knowledge is tiny &#8211; is this some kind of way of loading multiple js files that&#8217;s not covered above? It almost looks like it could loop through a few js files&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Free Chapter: &#8220;Coding and Design Patterns&#8221; from Stoyan Stefanov&#8217;s Object-Oriented JavaScript &#187; Yahoo! User Interface Blog</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-478850</link>
		<dc:creator>Free Chapter: &#8220;Coding and Design Patterns&#8221; from Stoyan Stefanov&#8217;s Object-Oriented JavaScript &#187; Yahoo! User Interface Blog</dc:creator>
		<pubDate>Fri, 26 Sep 2008 15:30:06 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-478850</guid>
		<description>[...] Stoyan Stefanov is a member of Yahoo&#8217;s Exceptional Performance team; he&#8217;s worked on a variety of performance-related projects at Yahoo, including the popular YSlow plugin for Firebug. He&#8217;s also a contributing author here on YUIBlog. [...]</description>
		<content:encoded><![CDATA[<p>[...] Stoyan Stefanov is a member of Yahoo&#8217;s Exceptional Performance team; he&#8217;s worked on a variety of performance-related projects at Yahoo, including the popular YSlow plugin for Firebug. He&#8217;s also a contributing author here on YUIBlog. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sherita</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-439565</link>
		<dc:creator>sherita</dc:creator>
		<pubDate>Thu, 07 Aug 2008 20:35:02 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-439565</guid>
		<description>how do i install javascript on my computer</description>
		<content:encoded><![CDATA[<p>how do i install javascript on my computer</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: speeding up page loads &#171; null pointers &#8230;</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-439262</link>
		<dc:creator>speeding up page loads &#171; null pointers &#8230;</dc:creator>
		<pubDate>Thu, 07 Aug 2008 08:51:53 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-439262</guid>
		<description>[...] http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/" rel="nofollow">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mike river</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-438854</link>
		<dc:creator>mike river</dc:creator>
		<pubDate>Wed, 06 Aug 2008 20:24:50 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-438854</guid>
		<description>Take it to the extreme!!! Load an empty html, start imediately loading js (break it in several files), css AND the remaining html, all in parallel ( you can load more than 2 in parallel, using subdomains, the limit is 2/url, studies show that optimal is 4(subdomains)x2 ).</description>
		<content:encoded><![CDATA[<p>Take it to the extreme!!! Load an empty html, start imediately loading js (break it in several files), css AND the remaining html, all in parallel ( you can load more than 2 in parallel, using subdomains, the limit is 2/url, studies show that optimal is 4(subdomains)x2 ).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Performance web &#187; Javascript non bloquant</title>
		<link>http://www.yuiblog.com/blog/2008/07/22/non-blocking-scripts/comment-page-1/#comment-437040</link>
		<dc:creator>Performance web &#187; Javascript non bloquant</dc:creator>
		<pubDate>Mon, 04 Aug 2008 10:01:23 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2008/07/22/non-blocking-scripts/#comment-437040</guid>
		<description>[...] Stefanov en parle lui aussi, en [...]</description>
		<content:encoded><![CDATA[<p>[...] Stefanov en parle lui aussi, en [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

