<?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: Code downloading with AJAX</title>
	<atom:link href="http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/</link>
	<description></description>
	<lastBuildDate>Tue, 23 Feb 2010 01:32:11 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Erik Arvidsson</title>
		<link>http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/comment-page-1/#comment-20</link>
		<dc:creator>Erik Arvidsson</dc:creator>
		<pubDate>Mon, 10 Oct 2005 04:54:47 +0000</pubDate>
		<guid isPermaLink="false">http://alexander.kirk.at/?p=19#comment-20</guid>
		<description>Be careful when using XHR for downloading js code. Firefox does not cache any data when using XHR and therefore the old school method (as explained by Michael above) is usually better.</description>
		<content:encoded><![CDATA[<p>Be careful when using XHR for downloading js code. Firefox does not cache any data when using XHR and therefore the old school method (as explained by Michael above) is usually better.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/comment-page-1/#comment-13</link>
		<dc:creator>David</dc:creator>
		<pubDate>Thu, 06 Oct 2005 19:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://alexander.kirk.at/?p=19#comment-13</guid>
		<description>That&#039;s how Dojo works, it downloads the pieces you ask for. The thing is that, once you are done deving your app, you know what pieces you want to pull in, so Dojo lets you build that into a single file for distribution.

-David
Dojo Foundation</description>
		<content:encoded><![CDATA[<p>That's how Dojo works, it downloads the pieces you ask for. The thing is that, once you are done deving your app, you know what pieces you want to pull in, so Dojo lets you build that into a single file for distribution.</p>
<p>-David<br />
Dojo Foundation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Richard</title>
		<link>http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/comment-page-1/#comment-10</link>
		<dc:creator>Richard</dc:creator>
		<pubDate>Thu, 06 Oct 2005 13:23:06 +0000</pubDate>
		<guid isPermaLink="false">http://alexander.kirk.at/?p=19#comment-10</guid>
		<description>Yes, I&#039;m sure my technique using Blowfish could be used to give some protection to downloaded code -- but since the client-side would have to know the key to decrypt, the protection would be minimal.  Script-kiddie protetion, as alluded to, at best.  The other issue with using Blowfish is that the crypto-text is binary, so it would normally be base64 encoded after encyrption -- which expands the size of the download.  So you might want to compress and then encrypt -- hoping to break even or maybe even save a few bits, at the cost of some extra client-side cycles.  And really, the compression alone might provide just as much script-kiddie protection as the crypto 

-rich</description>
		<content:encoded><![CDATA[<p>Yes, I'm sure my technique using Blowfish could be used to give some protection to downloaded code -- but since the client-side would have to know the key to decrypt, the protection would be minimal.&nbsp;&nbsp;Script-kiddie protetion, as alluded to, at best.&nbsp;&nbsp;The other issue with using Blowfish is that the crypto-text is binary, so it would normally be base64 encoded after encyrption -- which expands the size of the download.&nbsp;&nbsp;So you might want to compress and then encrypt -- hoping to break even or maybe even save a few bits, at the cost of some extra client-side cycles.&nbsp;&nbsp;And really, the compression alone might provide just as much script-kiddie protection as the crypto </p>
<p>-rich</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Mahemoff</title>
		<link>http://alexander.kirk.at/2005/10/05/code-downloading-with-ajax/comment-page-1/#comment-6</link>
		<dc:creator>Michael Mahemoff</dc:creator>
		<pubDate>Thu, 06 Oct 2005 02:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://alexander.kirk.at/?p=19#comment-6</guid>
		<description>Hi Alex, it sounds like &lt;a href=&quot;http://www.softwareas.com/ajax-can-improve-performance-too&quot; rel=&quot;nofollow&quot;&gt; I guessed right wrt &quot;code downloading&quot;&lt;/a&gt;. FYI Here&#039;s &lt;a href=&quot;http://www.softwareas.com/ajax-can-improve-performance-too&quot; rel=&quot;nofollow&quot;&gt;demo&lt;/a&gt; based on an alternative approach - changing the head. The main part is:

  if (self.uploadMessages) { // Already exists
    return;
  }
  var head = document.getElementsByTagName(&quot;head&quot;)[0];
  script = document.createElement(&#039;script&#039;);
  script.type = &#039;text/javascript&#039;;
  script.src = &quot;upload.js&quot;;
  head.appendChild(script)

eval() is probably better from a memory perspective, this is just an interesting alternative.

Regarding encryption, Richard Schwartz started a conversation a while ago about &lt;a href=&quot;http://smokey.rhs.com/web/blog/PowerOfTheSchwartz.nsf/d6plinks/RSCZ-6C5G54&quot; rel=&quot;nofollow&quot;&gt;JS decryption&lt;/a&gt; to protect data on the host side - &lt;a href=&quot;http://www.ajaxpatterns.org/Host-Proof_Hosting&quot; rel=&quot;nofollow&quot;&gt;Host-Proof Hosting&lt;/a&gt;. Hadn&#039;t considered it from a JS perspective because - as you allude to - it&#039;s easy enough to reveal the JS. But given the lengths people go to in order to protect their scripts, it&#039;s an interesting idea.</description>
		<content:encoded><![CDATA[<p>Hi Alex, it sounds like <a &nbsp;&nbsp; href="http://www.softwareas.com/ajax-can-improve-performance-too"&nbsp;&nbsp; rel="nofollow"> I guessed right wrt "code downloading"</a>. FYI Here's <a &nbsp;&nbsp; href="http://www.softwareas.com/ajax-can-improve-performance-too"&nbsp;&nbsp; rel="nofollow">demo</a> based on an alternative approach - changing the head. The main part is:</p>
<p>&nbsp;&nbsp;if (self.uploadMessages) { // Already exists<br />
&nbsp;&nbsp;&nbsp;&nbsp;return;<br />
&nbsp;&nbsp;}<br />
&nbsp;&nbsp;var head = document.getElementsByTagName("head")[0];<br />
&nbsp;&nbsp;script = document.createElement('script');<br />
&nbsp;&nbsp;script.type = 'text/javascript';<br />
&nbsp;&nbsp;script.src = "upload.js";<br />
&nbsp;&nbsp;head.appendChild(script)</p>
<p>eval() is probably better from a memory perspective, this is just an interesting alternative.</p>
<p>Regarding encryption, Richard Schwartz started a conversation a while ago about <a &nbsp;&nbsp; href="http://smokey.rhs.com/web/blog/PowerOfTheSchwartz.nsf/d6plinks/RSCZ-6C5G54"&nbsp;&nbsp; rel="nofollow">JS decryption</a> to protect data on the host side - <a &nbsp;&nbsp; href="http://www.ajaxpatterns.org/Host-Proof_Hosting"&nbsp;&nbsp; rel="nofollow">Host-Proof Hosting</a>. Hadn't considered it from a JS perspective because - as you allude to - it's easy enough to reveal the JS. But given the lengths people go to in order to protect their scripts, it's an interesting idea.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
