<?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: Coupling asynchronous scripts</title>
	<atom:link href="http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/</link>
	<description>Essential knowledge for making your web pages faster.</description>
	<lastBuildDate>Sat, 04 Feb 2012 09:46:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Iouri Goussev</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-2802</link>
		<dc:creator>Iouri Goussev</dc:creator>
		<pubDate>Thu, 16 Dec 2010 04:59:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-2802</guid>
		<description>@sunnybear interesting idea with polling.</description>
		<content:encoded><![CDATA[<p>@sunnybear interesting idea with polling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NJ Website Design</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-1684</link>
		<dc:creator>NJ Website Design</dc:creator>
		<pubDate>Thu, 25 Feb 2010 19:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-1684</guid>
		<description>Coupling asynchronous scripts is just what I was looking for but I am having difficulty with asynch loading also.</description>
		<content:encoded><![CDATA[<p>Coupling asynchronous scripts is just what I was looking for but I am having difficulty with asynch loading also.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tham</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-590</link>
		<dc:creator>tham</dc:creator>
		<pubDate>Mon, 18 May 2009 09:01:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-590</guid>
		<description>Hi Steve,

Could you please look at my question about the race condition in js and asynchronize loading as seen in the link below

http://www.codingforums.com/showthread.php?p=816318#post816318</description>
		<content:encoded><![CDATA[<p>Hi Steve,</p>
<p>Could you please look at my question about the race condition in js and asynchronize loading as seen in the link below</p>
<p><a href="http://www.codingforums.com/showthread.php?p=816318#post816318" rel="nofollow">http://www.codingforums.com/showthread.php?p=816318#post816318</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: choonkeat</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-548</link>
		<dc:creator>choonkeat</dc:creator>
		<pubDate>Mon, 20 Apr 2009 22:01:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-548</guid>
		<description>When you can&#039;t post-load (due to several reasons), you can always pretend:

http://blog.choonkeat.com/weblog/2009/03/keeping-google-ads-documentwrite-and-browsers-all-happy.html</description>
		<content:encoded><![CDATA[<p>When you can&#8217;t post-load (due to several reasons), you can always pretend:</p>
<p><a href="http://blog.choonkeat.com/weblog/2009/03/keeping-google-ads-documentwrite-and-browsers-all-happy.html" rel="nofollow">http://blog.choonkeat.com/weblog/2009/03/keeping-google-ads-documentwrite-and-browsers-all-happy.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunnybear</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-428</link>
		<dc:creator>sunnybear</dc:creator>
		<pubDate>Thu, 15 Jan 2009 21:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-428</guid>
		<description>Steve. According to my previous notice I&#039;d like to share an example of async scripts loading -
http://webo.in/tests/yass-tree-load/
There 2 main cases
1. async scripts are loading in some kind of dependency tree (with recursive post-load handlers). Onload / onreadystatechange is used to run handlers and linked innerHTML code (is required only for Opera - as &#039;ve noticed - all the other browsers handles dual scripts well).
2. Secondly there is a JS-counter example. Its onload handler defined via title attribute and this approach can be used for fully external scripts -- i.e. GA from my previous reply.

Of course thanks for Onload / Onreadystatechange approach -- it really works.

Maybe this will help somehow somebody...</description>
		<content:encoded><![CDATA[<p>Steve. According to my previous notice I&#8217;d like to share an example of async scripts loading -<br />
<a href="http://webo.in/tests/yass-tree-load/" rel="nofollow">http://webo.in/tests/yass-tree-load/</a><br />
There 2 main cases<br />
1. async scripts are loading in some kind of dependency tree (with recursive post-load handlers). Onload / onreadystatechange is used to run handlers and linked innerHTML code (is required only for Opera &#8211; as &#8216;ve noticed &#8211; all the other browsers handles dual scripts well).<br />
2. Secondly there is a JS-counter example. Its onload handler defined via title attribute and this approach can be used for fully external scripts &#8212; i.e. GA from my previous reply.</p>
<p>Of course thanks for Onload / Onreadystatechange approach &#8212; it really works.</p>
<p>Maybe this will help somehow somebody&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wei</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-390</link>
		<dc:creator>David Wei</dc:creator>
		<pubDate>Sun, 04 Jan 2009 23:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-390</guid>
		<description>Thanks, Steve.

We have been using dynamic script DOM element and it does improve the site speed a lot.

just want to share one small lesson we learnt from our practice on dynamic script DOM element:  it seems that the dynamic script DOM element is not fully compatible with firebug. It is more due to a firebug&#039;s bug (http://code.google.com/p/fbug/issues/detail?id=721) but the effect is very inconvenient for web developers.


Basically, with dynamic script DOM element, firebug&#039;s console might be disabled (if any asynchronously loaded script access variable &quot;console&quot;, even check typeof &quot;console&quot;).

One way we resolved this is to have &quot;window.loadFirebugConsole &amp;&amp; window.loadFirebugConsole();&quot; in a static script tag before any dynamic script DOM element is loaded. This single line of work-around spent us a few days so I guess it might be worth to share here.</description>
		<content:encoded><![CDATA[<p>Thanks, Steve.</p>
<p>We have been using dynamic script DOM element and it does improve the site speed a lot.</p>
<p>just want to share one small lesson we learnt from our practice on dynamic script DOM element:  it seems that the dynamic script DOM element is not fully compatible with firebug. It is more due to a firebug&#8217;s bug (<a href="http://code.google.com/p/fbug/issues/detail?id=721" rel="nofollow">http://code.google.com/p/fbug/issues/detail?id=721</a>) but the effect is very inconvenient for web developers.</p>
<p>Basically, with dynamic script DOM element, firebug&#8217;s console might be disabled (if any asynchronously loaded script access variable &#8220;console&#8221;, even check typeof &#8220;console&#8221;).</p>
<p>One way we resolved this is to have &#8220;window.loadFirebugConsole &amp;&amp; window.loadFirebugConsole();&#8221; in a static script tag before any dynamic script DOM element is loaded. This single line of work-around spent us a few days so I guess it might be worth to share here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Timothy</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-389</link>
		<dc:creator>Timothy</dc:creator>
		<pubDate>Wed, 31 Dec 2008 15:34:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-389</guid>
		<description>Nice post. Very informative.

I&#039;ve read up on placing JS includes right before the . Heard about that through YSlow. But the other content you provide is really interesting. Thanks!</description>
		<content:encoded><![CDATA[<p>Nice post. Very informative.</p>
<p>I&#8217;ve read up on placing JS includes right before the . Heard about that through YSlow. But the other content you provide is really interesting. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-387</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Tue, 30 Dec 2008 17:38:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-387</guid>
		<description>@sunnybear: I&#039;m planning on including this topic in my next book. I&#039;ll certainly add your polling technique, although I prefer using callbacks to polling.</description>
		<content:encoded><![CDATA[<p>@sunnybear: I&#8217;m planning on including this topic in my next book. I&#8217;ll certainly add your polling technique, although I prefer using callbacks to polling.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sunnybear</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-386</link>
		<dc:creator>sunnybear</dc:creator>
		<pubDate>Tue, 30 Dec 2008 12:28:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-386</guid>
		<description>@Vish, @Steve: we can use another pattern for such scripts: check time to time if main funciton is loaded (i.e. urchinTracker).

I think there should be an article about different approaches to load scripts unobtrusively written. I mean -- sometimes we can use simple John&#039;s approach, sometimes -- your LazyLoading. Sometimes -- onReadyExecution (that I&#039;ve already described in my book in Russian, for GA):
var _on_ready_execution = setInterval(function() {
 if (typeof urchinTracker === &#039;function&#039;) {
  urchinTracker();
  clearInterval(_on_ready_execution);
 }
}, 10);

Also we can include all function calls into main script, as Vish has noticed.</description>
		<content:encoded><![CDATA[<p>@Vish, @Steve: we can use another pattern for such scripts: check time to time if main funciton is loaded (i.e. urchinTracker).</p>
<p>I think there should be an article about different approaches to load scripts unobtrusively written. I mean &#8212; sometimes we can use simple John&#8217;s approach, sometimes &#8212; your LazyLoading. Sometimes &#8212; onReadyExecution (that I&#8217;ve already described in my book in Russian, for GA):<br />
var _on_ready_execution = setInterval(function() {<br />
 if (typeof urchinTracker === &#8216;function&#8217;) {<br />
  urchinTracker();<br />
  clearInterval(_on_ready_execution);<br />
 }<br />
}, 10);</p>
<p>Also we can include all function calls into main script, as Vish has noticed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Souders</title>
		<link>http://www.stevesouders.com/blog/2008/12/27/coupling-async-scripts/#comment-383</link>
		<dc:creator>Steve Souders</dc:creator>
		<pubDate>Mon, 29 Dec 2008 18:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.stevesouders.com/blog/?p=213#comment-383</guid>
		<description>@Vish: I was looking for a more flexible pattern for integrating 3rd party scripts. Although in this case the 3rd party script only has one API function, that&#039;s typically not the case. For typical libraries (jQuery, Google Analytics) the 3rd party developer can&#039;t hardwire the API functions at the bottom of the module.</description>
		<content:encoded><![CDATA[<p>@Vish: I was looking for a more flexible pattern for integrating 3rd party scripts. Although in this case the 3rd party script only has one API function, that&#8217;s typically not the case. For typical libraries (jQuery, Google Analytics) the 3rd party developer can&#8217;t hardwire the API functions at the bottom of the module.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

