<?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: A Technique For Lazy Script Loading</title>
	<atom:link href="http://ajaxian.com/archives/a-technique-for-lazy-script-loading/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Thu, 17 May 2012 07:43:39 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: herringtown</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-277803</link>
		<dc:creator>herringtown</dc:creator>
		<pubDate>Tue, 12 Jan 2010 18:32:50 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-277803</guid>
		<description>Methinks prototype should incorporate this natively, ala jQuery&#039;s jQuery.getScript(...), as @cancelbubble pointed out above.  I haven&#039;t poked around with the source of it, but I assume it handles re-load checking, etc.</description>
		<content:encoded><![CDATA[<p>Methinks prototype should incorporate this natively, ala jQuery&#8217;s jQuery.getScript(&#8230;), as @cancelbubble pointed out above.  I haven&#8217;t poked around with the source of it, but I assume it handles re-load checking, etc.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidchambers</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-274593</link>
		<dc:creator>davidchambers</dc:creator>
		<pubDate>Sat, 18 Jul 2009 02:09:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-274593</guid>
		<description>I&#039;ve been using your browser sniffing code to lazily load scripts on my site. I&#039;ve just discovered one change that should be made...

&lt;code&gt;Prototype.Browser.WebKit &amp;&amp; !navigator.userAgent.match(/Version\/3/)&lt;/code&gt;

should be replaced with...

&lt;code&gt;Prototype.Browser.WebKit &amp;&amp; navigator.userAgent.match(/Version\/[12]/)&lt;/code&gt;

This will ensure that Safari 4 is treated the same way as Safari 3.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been using your browser sniffing code to lazily load scripts on my site. I&#8217;ve just discovered one change that should be made&#8230;</p>
<p><code>Prototype.Browser.WebKit &amp;&amp; !navigator.userAgent.match(/Version\/3/)</code></p>
<p>should be replaced with&#8230;</p>
<p><code>Prototype.Browser.WebKit &amp;&amp; navigator.userAgent.match(/Version\/[12]/)</code></p>
<p>This will ensure that Safari 4 is treated the same way as Safari 3.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cancelbubble</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-272513</link>
		<dc:creator>cancelbubble</dc:creator>
		<pubDate>Fri, 03 Apr 2009 00:57:24 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-272513</guid>
		<description>jQuery can dynamically load scripts into a page with $.getScript(url, callback)</description>
		<content:encoded><![CDATA[<p>jQuery can dynamically load scripts into a page with $.getScript(url, callback)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FrankThuerigen</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-266229</link>
		<dc:creator>FrankThuerigen</dc:creator>
		<pubDate>Wed, 30 Jul 2008 11:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-266229</guid>
		<description>@micmath: twoBirds can do it, but this is rather a js file naming issue for application code. I don´t think there is a general out-of-the-box solution for system library code like jQuery and EXT, unless functionality is provided by the authors of these libs. BTW, jQuery can handle it, about the others I don´t know.</description>
		<content:encoded><![CDATA[<p>@micmath: twoBirds can do it, but this is rather a js file naming issue for application code. I don´t think there is a general out-of-the-box solution for system library code like jQuery and EXT, unless functionality is provided by the authors of these libs. BTW, jQuery can handle it, about the others I don´t know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: micmath</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-265053</link>
		<dc:creator>micmath</dc:creator>
		<pubDate>Fri, 13 Jun 2008 10:45:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-265053</guid>
		<description>I&#039;m researching a solution that does all of this (dependencies, cross domain loading, callbacks) and one more thing: it must allow multiple versions of the same JavaScript modules to be loaded on the same page without overwriting each other. Any one know of an existing application?</description>
		<content:encoded><![CDATA[<p>I&#8217;m researching a solution that does all of this (dependencies, cross domain loading, callbacks) and one more thing: it must allow multiple versions of the same JavaScript modules to be loaded on the same page without overwriting each other. Any one know of an existing application?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: BjornGoransson</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264938</link>
		<dc:creator>BjornGoransson</dc:creator>
		<pubDate>Tue, 10 Jun 2008 08:10:15 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264938</guid>
		<description>Nice article...

I&#039;m thinking... a lazy Java class loader along with the JVM that was made in JS... or something...</description>
		<content:encoded><![CDATA[<p>Nice article&#8230;</p>
<p>I&#8217;m thinking&#8230; a lazy Java class loader along with the JVM that was made in JS&#8230; or something&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: temsa</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264778</link>
		<dc:creator>temsa</dc:creator>
		<pubDate>Sat, 07 Jun 2008 12:41:04 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264778</guid>
		<description>Archetype JS provides this kind of loading, a logging interface and a configuration that handles the script and file in a java package manner with it&#039;s dependencies, giving you the ability to alias some file and load whatever it needs to work.

http://archetypejs.org</description>
		<content:encoded><![CDATA[<p>Archetype JS provides this kind of loading, a logging interface and a configuration that handles the script and file in a java package manner with it&#8217;s dependencies, giving you the ability to alias some file and load whatever it needs to work.</p>
<p><a href="http://archetypejs.org" rel="nofollow">http://archetypejs.org</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: FrankThuerigen</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264777</link>
		<dc:creator>FrankThuerigen</dc:creator>
		<pubDate>Sat, 07 Jun 2008 10:22:02 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264777</guid>
		<description>@PeterMichaux I second that... IÂ´d advise to get rid of browser sniffing as much as possible, because it causes a constant need of redesign as new browsers come up - especially if large portions of library code rely on it.</description>
		<content:encoded><![CDATA[<p>@PeterMichaux I second that&#8230; IÂ´d advise to get rid of browser sniffing as much as possible, because it causes a constant need of redesign as new browsers come up &#8211; especially if large portions of library code rely on it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeterMichaux</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264667</link>
		<dc:creator>PeterMichaux</dc:creator>
		<pubDate>Sat, 07 Jun 2008 05:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264667</guid>
		<description>Browser sniffing is bad! It is not necessary to user a browser sniff to load some script into a browser.</description>
		<content:encoded><![CDATA[<p>Browser sniffing is bad! It is not necessary to user a browser sniff to load some script into a browser.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: aheckmann</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264626</link>
		<dc:creator>aheckmann</dc:creator>
		<pubDate>Fri, 06 Jun 2008 21:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264626</guid>
		<description>He said, she said, I did it first, who cares. Let&#039;s just learn from each other shall we?</description>
		<content:encoded><![CDATA[<p>He said, she said, I did it first, who cares. Let&#8217;s just learn from each other shall we?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uize</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264607</link>
		<dc:creator>uize</dc:creator>
		<pubDate>Fri, 06 Jun 2008 21:02:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264607</guid>
		<description>@bobmatnyc
Thanks for chiming in. It&#039;s great that you&#039;re investing in this exploration and keeping us updated with your findings.</description>
		<content:encoded><![CDATA[<p>@bobmatnyc<br />
Thanks for chiming in. It&#8217;s great that you&#8217;re investing in this exploration and keeping us updated with your findings.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobmatnyc</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264547</link>
		<dc:creator>bobmatnyc</dc:creator>
		<pubDate>Fri, 06 Jun 2008 20:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264547</guid>
		<description>@Harald

I&#039;m not as big a fan of CSS loading, particularly because I don&#039;t think CSS lends itself as well to this type of functionally-specific segmentation.  I think a better approach with CSS is to combine GZIP w/ content expiration.</description>
		<content:encoded><![CDATA[<p>@Harald</p>
<p>I&#8217;m not as big a fan of CSS loading, particularly because I don&#8217;t think CSS lends itself as well to this type of functionally-specific segmentation.  I think a better approach with CSS is to combine GZIP w/ content expiration.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bobmatnyc</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264546</link>
		<dc:creator>bobmatnyc</dc:creator>
		<pubDate>Fri, 06 Jun 2008 20:10:52 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264546</guid>
		<description>@uize
The logic in this is entirely my own, though I&#039;ve obviously built on the work of others.  In fact, this article was meant to extend a previous one that only discussed script injection by adding callbacks, intervals, and script tracking.  I assumed others have done the same, but I hadn&#039;t seen them.  

One other addendum.  While Safari 3 does support DOM tracking of script injection, it seems a bit flakey.  I went back to internal testing and it seems more reliable.

I should also point out that I use lazy loading in conjunction with declarative binding for best results (add custom attributes to a form and look for those attributes on page load to inject script and bind to that form.  If Dion is gracious enough, I&#039;ll post a follow-up describing that technique).</description>
		<content:encoded><![CDATA[<p>@uize<br />
The logic in this is entirely my own, though I&#8217;ve obviously built on the work of others.  In fact, this article was meant to extend a previous one that only discussed script injection by adding callbacks, intervals, and script tracking.  I assumed others have done the same, but I hadn&#8217;t seen them.  </p>
<p>One other addendum.  While Safari 3 does support DOM tracking of script injection, it seems a bit flakey.  I went back to internal testing and it seems more reliable.</p>
<p>I should also point out that I use lazy loading in conjunction with declarative binding for best results (add custom attributes to a form and look for those attributes on page load to inject script and bind to that form.  If Dion is gracious enough, I&#8217;ll post a follow-up describing that technique).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uize</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264538</link>
		<dc:creator>uize</dc:creator>
		<pubDate>Fri, 06 Jun 2008 19:52:39 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264538</guid>
		<description>@ttrenka
Thanks for the historical info.</description>
		<content:encoded><![CDATA[<p>@ttrenka<br />
Thanks for the historical info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uize</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264532</link>
		<dc:creator>uize</dc:creator>
		<pubDate>Fri, 06 Jun 2008 19:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264532</guid>
		<description>@Tr0y
Sorry... I wasn&#039;t suggesting for a second that any code or idea was *ripped*. There&#039;s obviously been a ton of great thought on this subject by a number of smart people, such that it&#039;s futile trying to claim, suggest, or even hint at ownership. This is a great forum for us all to learn from one another&#039;s advances.</description>
		<content:encoded><![CDATA[<p>@Tr0y<br />
Sorry&#8230; I wasn&#8217;t suggesting for a second that any code or idea was *ripped*. There&#8217;s obviously been a ton of great thought on this subject by a number of smart people, such that it&#8217;s futile trying to claim, suggest, or even hint at ownership. This is a great forum for us all to learn from one another&#8217;s advances.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ttrenka</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264531</link>
		<dc:creator>ttrenka</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:59:30 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264531</guid>
		<description>I should add that reading the articles can be an invaluable resource for anyone interested in JS techniques, such as this one.</description>
		<content:encoded><![CDATA[<p>I should add that reading the articles can be an invaluable resource for anyone interested in JS techniques, such as this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ttrenka</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264530</link>
		<dc:creator>ttrenka</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:54:29 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264530</guid>
		<description>First version was written by Dan Pupius (now of Gmail) back in 2001, adopted by me later on in the f(m) toolkit (2002-ish), and has been a staple of Dojo since the get-go.

Before that, library loading was done in JS by Dan Steinmann with the DynAPI, which was aimed at Netscape layers and IE divs.

I have to agree with Tr0y: it gets a little old when commenters see a decent implementation of a particular technique, jump on it with a less-than-friendly-tone, and then attempt to plug their own work in the process.  It makes it so that its almost not worth reading the comments here anymore.


Almost.</description>
		<content:encoded><![CDATA[<p>First version was written by Dan Pupius (now of Gmail) back in 2001, adopted by me later on in the f(m) toolkit (2002-ish), and has been a staple of Dojo since the get-go.</p>
<p>Before that, library loading was done in JS by Dan Steinmann with the DynAPI, which was aimed at Netscape layers and IE divs.</p>
<p>I have to agree with Tr0y: it gets a little old when commenters see a decent implementation of a particular technique, jump on it with a less-than-friendly-tone, and then attempt to plug their own work in the process.  It makes it so that its almost not worth reading the comments here anymore.</p>
<p>Almost.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264529</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:50:56 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264529</guid>
		<description>Also, dojo.require can load a Javascript module from the appropriate URI.  They had this feature available for a long time.</description>
		<content:encoded><![CDATA[<p>Also, dojo.require can load a Javascript module from the appropriate URI.  They had this feature available for a long time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tr0y</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264528</link>
		<dc:creator>Tr0y</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264528</guid>
		<description>@uize, and @polterguy you guys are constantly plugging your frameworks, it is ridiculously obvious.

@uize Unless you know it is ripped and can provide a link other than plugging your own framework, say so... otherwise don&#039;t even hint at the fact that it isn&#039;t their code, because you don&#039;t even know.

Also, &quot;LazyLoading&quot; has been around forever, so claiming that you were the first is silly. I&#039;d bet the first implementation was even before your framework was even written.</description>
		<content:encoded><![CDATA[<p>@uize, and @polterguy you guys are constantly plugging your frameworks, it is ridiculously obvious.</p>
<p>@uize Unless you know it is ripped and can provide a link other than plugging your own framework, say so&#8230; otherwise don&#8217;t even hint at the fact that it isn&#8217;t their code, because you don&#8217;t even know.</p>
<p>Also, &#8220;LazyLoading&#8221; has been around forever, so claiming that you were the first is silly. I&#8217;d bet the first implementation was even before your framework was even written.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: polterguy</title>
		<link>http://ajaxian.com/archives/a-technique-for-lazy-script-loading/comment-page-1#comment-264527</link>
		<dc:creator>polterguy</dc:creator>
		<pubDate>Fri, 06 Jun 2008 18:23:18 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=3723#comment-264527</guid>
		<description>Great work, we&#039;ve had this natively in Gaia for more than a year though. It works completely abstracted away too so when you show or create a widget on the Server Side the widget itself will track which JS files to include and every piece of code that references that widget in the return value back to the client will wait until the JS files included in that callback are finished loading. But I guess this is good news for those not using Gaia ;)</description>
		<content:encoded><![CDATA[<p>Great work, we&#8217;ve had this natively in Gaia for more than a year though. It works completely abstracted away too so when you show or create a widget on the Server Side the widget itself will track which JS files to include and every piece of code that references that widget in the return value back to the client will wait until the JS files included in that callback are finished loading. But I guess this is good news for those not using Gaia ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

