<?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: 3 reasons why you should let Google host jQuery for you</title>
	<atom:link href="http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/feed/" rel="self" type="application/rss+xml" />
	<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/</link>
	<description>ASP.NET and AJAX code, ideas, and examples.</description>
	<lastBuildDate>Fri, 12 Mar 2010 17:47:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Daniele</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38254</link>
		<dc:creator>Daniele</dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:15:31 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38254</guid>
		<description>Sorry, I&#039;ve lost some piece of code. Hope this works:

&lt;pre lang=&quot;html&quot;&gt;


	if (typeof jQuery === &#039;undefined&#039;){
		document.write(unescape(&quot;%3Cscript src=&#039;js/jquery-1.4.2.min.js&#039; type=&#039;text/javascript&#039;%3E%3C/script%3E&quot;));
	}

 

&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Sorry, I&#8217;ve lost some piece of code. Hope this works:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&nbsp;
&nbsp;
	if (typeof jQuery === 'undefined'){
		document.write(unescape(&quot;%3Cscript src='js/jquery-1.4.2.min.js' type='text/javascript'%3E%3C/script%3E&quot;));
	}</pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Daniele</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38253</link>
		<dc:creator>Daniele</dc:creator>
		<pubDate>Fri, 12 Mar 2010 14:10:41 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38253</guid>
		<description>I&#039;ve tried the &lt;em&gt;check and eventually load locally&lt;em&gt; method above; I&#039;ve intetionally used a bad url for google jquery to see if the local loading of jquery was really done. And indeed it was, but looking at firebug network tab, I see that others js libraries requiring jquery, load before the local copy of jquery, breaking any jquery-dependent functionality on the page.   
Here&#039;s my test code:
&lt;pre lang=&quot;html&quot;&gt;
&lt;!-- Call to non-existant jquery file on Google  --&gt; 
 

	if (typeof jQuery === &#039;undefined&#039;){
		document.write(unescape(&quot;%3Cscript src=&#039;js/jquery-1.4.2.min.js&#039; type=&#039;text/javascript&#039;%3E%3C/script%3E&quot;));
	}

 
&lt;!-- Tabs, Tooltip, Scrollable, Overlay, Expose. No jQuery.  

&lt;/pre&gt;

Firefox loads the second library as soon as google gives the 404 error, and then loads local copy of jquery after some other resource files, as ccs o gifs. 
Do you know a way to correct this behaviour? Am I doing something wrong?

Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried the <em>check and eventually load locally</em><em> method above; I&#8217;ve intetionally used a bad url for google jquery to see if the local loading of jquery was really done. And indeed it was, but looking at firebug network tab, I see that others js libraries requiring jquery, load before the local copy of jquery, breaking any jquery-dependent functionality on the page.<br />
Here&#8217;s my test code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #060; font-style: italic;">&lt;!-- Call to non-existant jquery file on Google  --&gt;</span></span> 
&nbsp;
&nbsp;
	if (typeof jQuery === 'undefined'){
		document.write(unescape(&quot;%3Cscript src='js/jquery-1.4.2.min.js' type='text/javascript'%3E%3C/script%3E&quot;));
	}
&nbsp;
&nbsp;
<span style="color: #ddbb00;">&amp;lt;</span>!-- Tabs, Tooltip, Scrollable, Overlay, Expose. No jQuery.</pre></div></div>

<p>Firefox loads the second library as soon as google gives the 404 error, and then loads local copy of jquery after some other resource files, as ccs o gifs.<br />
Do you know a way to correct this behaviour? Am I doing something wrong?</p>
<p>Thanks!</em></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38250</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Thu, 11 Mar 2010 18:05:43 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38250</guid>
		<description>That&#039;s definitely a valid concern.

Of course, if Google&#039;s CDN were compromised, you&#039;d probably find that out much quicker than if your own hosting was.</description>
		<content:encoded><![CDATA[<p>That&#8217;s definitely a valid concern.</p>
<p>Of course, if Google&#8217;s CDN were compromised, you&#8217;d probably find that out much quicker than if your own hosting was.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uberVU - social comments</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38248</link>
		<dc:creator>uberVU - social comments</dc:creator>
		<pubDate>Thu, 11 Mar 2010 12:33:44 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38248</guid>
		<description>&lt;strong&gt;Social comments and analytics for this post...&lt;/strong&gt;

This post was mentioned on Twitter by alexanderkahn: @chipkaye If you use a Google-hosted one, users will probably already have a it cached, and thus will have to wait less. http://is.gd/LJPM...</description>
		<content:encoded><![CDATA[<p><strong>Social comments and analytics for this post&#8230;</strong></p>
<p>This post was mentioned on Twitter by alexanderkahn: @chipkaye If you use a Google-hosted one, users will probably already have a it cached, and thus will have to wait less. <a href="http://is.gd/LJPM.." rel="nofollow">http://is.gd/LJPM..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Sanders</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38245</link>
		<dc:creator>John Sanders</dc:creator>
		<pubDate>Wed, 10 Mar 2010 23:47:18 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38245</guid>
		<description>Thanks for the article Dave!

What makes me most uncomfortable about this approach is security. If Google&#039;s servers are ever hacked (improbable, but not impossible), then think about how many websites will be running malicious code.  Who knows what kind of information a bad person could grab by reading your cookies, or scraping your screen. For this reason, I would only use this strategy for websites that contain no private user information.

Hacking happens.

John</description>
		<content:encoded><![CDATA[<p>Thanks for the article Dave!</p>
<p>What makes me most uncomfortable about this approach is security. If Google&#8217;s servers are ever hacked (improbable, but not impossible), then think about how many websites will be running malicious code.  Who knows what kind of information a bad person could grab by reading your cookies, or scraping your screen. For this reason, I would only use this strategy for websites that contain no private user information.</p>
<p>Hacking happens.</p>
<p>John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Notes from Day One of WordCamp Ireland &#124; Steve Flinter</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38241</link>
		<dc:creator>Notes from Day One of WordCamp Ireland &#124; Steve Flinter</dc:creator>
		<pubDate>Mon, 08 Mar 2010 23:40:48 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38241</guid>
		<description>[...] If using JQuery, then use Google servers. [...]</description>
		<content:encoded><![CDATA[<p>[...] If using JQuery, then use Google servers. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lifesize Blog</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38206</link>
		<dc:creator>Lifesize Blog</dc:creator>
		<pubDate>Wed, 03 Mar 2010 19:43:46 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38206</guid>
		<description>[...] many advantages to this but we won&#8217;t get into them now (if you are really curious check out this post). For now just consider it &#8220;best [...]</description>
		<content:encoded><![CDATA[<p>[...] many advantages to this but we won&#8217;t get into them now (if you are really curious check out this post). For now just consider it &#8220;best [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Donald Jenkins</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38128</link>
		<dc:creator>Donald Jenkins</dc:creator>
		<pubDate>Wed, 24 Feb 2010 02:02:01 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38128</guid>
		<description>Interesting.  I doubt the benefit of users not having to download jQuery at all because it&#039;s cached exceed that of minifying all your javascript files,including jQuery, into one file and serving it from Cloudfront, which is what I do.</description>
		<content:encoded><![CDATA[<p>Interesting.  I doubt the benefit of users not having to download jQuery at all because it&#8217;s cached exceed that of minifying all your javascript files,including jQuery, into one file and serving it from Cloudfront, which is what I do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38117</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Tue, 23 Feb 2010 04:45:42 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38117</guid>
		<description>Privacy on the Internet is a nice notion, but largely an illusion.  Of all the actively invasive methods that advertisers and ISPs use to track users, focusing on the potentially once-per-year jQuery CDN accesses is a non-starter for me.  If Google were really out to leverage the service for &quot;evil&quot;, they definitely would not serve the file with a +1 year expires header.</description>
		<content:encoded><![CDATA[<p>Privacy on the Internet is a nice notion, but largely an illusion.  Of all the actively invasive methods that advertisers and ISPs use to track users, focusing on the potentially once-per-year jQuery CDN accesses is a non-starter for me.  If Google were really out to leverage the service for &#8220;evil&#8221;, they definitely would not serve the file with a +1 year expires header.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38115</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Tue, 23 Feb 2010 04:36:15 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38115</guid>
		<description>Falling back to a local copy is automatic.  Why bother?  Eliminating a quarter-second or so of page-blocking JavaScript is well worth understanding how to best use the resources available.  

As long as the majority of sites are using services such as AdSense, Google Analytics, Google Maps, etc, I have a hard time buying the FUD and paranoia.  Of all the services like that, using the CDN is one of the most benign, since the browser may not even contact Google again for a full year after jQuery has been downloaded once.</description>
		<content:encoded><![CDATA[<p>Falling back to a local copy is automatic.  Why bother?  Eliminating a quarter-second or so of page-blocking JavaScript is well worth understanding how to best use the resources available.  </p>
<p>As long as the majority of sites are using services such as AdSense, Google Analytics, Google Maps, etc, I have a hard time buying the FUD and paranoia.  Of all the services like that, using the CDN is one of the most benign, since the browser may not even contact Google again for a full year after jQuery has been downloaded once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: snlr</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38109</link>
		<dc:creator>snlr</dc:creator>
		<pubDate>Mon, 22 Feb 2010 12:00:10 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38109</guid>
		<description>I think, Billy Nguyen&#039;s concern cannot be dismissed. He points out that there are differences for commercial and for non-commercial websites, and that they must be considered, especially the ones about privacy, and especially if you&#039;re gaining about a millisecond in performance. A business should have the possibility to invest in a save CDN. Just as more and more businesses can&#039;t rely on Google Analytics anymore, because then you&#039;re sending certain 2-party-data to a 3rd party (Google). In some countries like here in Germany, this starts to go to courts already. The solution also for this problem is relying on software which can be hosted on the companie&#039;s property.

On the other hand, since when everyone points to Google for hosting of files, they get cached a lot and Google&#039;s servers are not contacted anymore, so it&#039;s even harder to make &quot;sense&quot; of this info.

Why not do it the other way around for business sites? Use a local copy, and when that is not available, fall back to a 3rd party CDN. Seems like an unusual case (unless you do have your own CDN or CDN-like setup), but if it does happen, it seems like good service to your customers not to bother them with the tech problems.</description>
		<content:encoded><![CDATA[<p>I think, Billy Nguyen&#8217;s concern cannot be dismissed. He points out that there are differences for commercial and for non-commercial websites, and that they must be considered, especially the ones about privacy, and especially if you&#8217;re gaining about a millisecond in performance. A business should have the possibility to invest in a save CDN. Just as more and more businesses can&#8217;t rely on Google Analytics anymore, because then you&#8217;re sending certain 2-party-data to a 3rd party (Google). In some countries like here in Germany, this starts to go to courts already. The solution also for this problem is relying on software which can be hosted on the companie&#8217;s property.</p>
<p>On the other hand, since when everyone points to Google for hosting of files, they get cached a lot and Google&#8217;s servers are not contacted anymore, so it&#8217;s even harder to make &#8220;sense&#8221; of this info.</p>
<p>Why not do it the other way around for business sites? Use a local copy, and when that is not available, fall back to a 3rd party CDN. Seems like an unusual case (unless you do have your own CDN or CDN-like setup), but if it does happen, it seems like good service to your customers not to bother them with the tech problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Billy Nguyen</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38106</link>
		<dc:creator>Billy Nguyen</dc:creator>
		<pubDate>Mon, 22 Feb 2010 10:03:51 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38106</guid>
		<description>Switching back to a local copy is your solution if something happens.  Then, why bother with that headache in the first place?  Beside, your suggestion shows that you did not consider the business implication. Redirecting your customers to Google equates with Google accessing your customer&#039;s intelligent info. Furthermore, it is practical to point out that jQuery is only about 70k. What gain you actually do? NOTHING.

Therefore, it is foolish and ill business practices, still.</description>
		<content:encoded><![CDATA[<p>Switching back to a local copy is your solution if something happens.  Then, why bother with that headache in the first place?  Beside, your suggestion shows that you did not consider the business implication. Redirecting your customers to Google equates with Google accessing your customer&#8217;s intelligent info. Furthermore, it is practical to point out that jQuery is only about 70k. What gain you actually do? NOTHING.</p>
<p>Therefore, it is foolish and ill business practices, still.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38102</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sun, 21 Feb 2010 18:26:43 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38102</guid>
		<description>Automatically falling back to a local copy isn&#039;t difficult (see the examples of that throughout the comments here).  In the bigger picture, I tend to &lt;a href=&quot;http://kohari.org/2009/12/07/guarantees-slas-and-hollow-promises/&quot; rel=&quot;nofollow&quot;&gt;agree with Nate that SLAs are empty&lt;/a&gt; anyway.  I&#039;m less interested in who to blame during the .0001% than I am how to improve performance/user-experience during the other 99.9999%.</description>
		<content:encoded><![CDATA[<p>Automatically falling back to a local copy isn&#8217;t difficult (see the examples of that throughout the comments here).  In the bigger picture, I tend to <a href="http://kohari.org/2009/12/07/guarantees-slas-and-hollow-promises/" rel="nofollow">agree with Nate that SLAs are empty</a> anyway.  I&#8217;m less interested in who to blame during the .0001% than I am how to improve performance/user-experience during the other 99.9999%.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38101</link>
		<dc:creator>Christopher</dc:creator>
		<pubDate>Sun, 21 Feb 2010 18:22:23 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38101</guid>
		<description>The difference is that the Google CDN for javascript libraries doesn&#039;t offer an SLA.</description>
		<content:encoded><![CDATA[<p>The difference is that the Google CDN for javascript libraries doesn&#8217;t offer an SLA.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Ward</title>
		<link>http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/#comment-38099</link>
		<dc:creator>Dave Ward</dc:creator>
		<pubDate>Sun, 21 Feb 2010 18:11:37 +0000</pubDate>
		<guid isPermaLink="false">http://encosia.com/?p=740#comment-38099</guid>
		<description>Unless you planned on modifying jQuery.js, you still have total control of your source code.  If something were to happen, you could switch the reference to a local copy in minutes.  It&#039;s no less practical than using any other CDN, which business sites have been doing for years.  Unfounded paranoia is no reason to slow the web down as a whole.</description>
		<content:encoded><![CDATA[<p>Unless you planned on modifying jQuery.js, you still have total control of your source code.  If something were to happen, you could switch the reference to a local copy in minutes.  It&#8217;s no less practical than using any other CDN, which business sites have been doing for years.  Unfounded paranoia is no reason to slow the web down as a whole.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
