<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Big Red Tin &#187; jQuery</title>
	<atom:link href="http://bigredtin.com/tag/jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://bigredtin.com</link>
	<description>Thoughts about the web and business from the large pantry</description>
	<lastBuildDate>Wed, 08 Feb 2012 06:55:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Putting the &#8220;distributed&#8221; in CDN</title>
		<link>http://bigredtin.com/2011/google-cdn-is-distributed/</link>
		<comments>http://bigredtin.com/2011/google-cdn-is-distributed/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 01:21:47 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Quick Notes]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://bigredtin.com/?p=1133</guid>
		<description><![CDATA[I wrote yesterday that Google appeared to have taken the distributed out of their public CDN hosting a variety of JavaScript libraries. I even provided some trace routes comparing their CDN to Microsoft's. I was wrong.]]></description>
				<content:encoded><![CDATA[<p><a href="http://bigredtin.com/2011/google-cdn-not-distributed/">I wrote yesterday</a> that Google appeared to have taken the &#8220;distributed&#8221; out of their public CDN hosting of a variety of JavaScript libraries. I even provided some trace routes comparing their CDN to Microsoft&#8217;s. I was wrong.</p>
<p>Unlike <a href="https://twitter.com/om4james/">James Collins</a>, we don&#8217;t have terminal access to any servers in Australia. As <a href="http://bigredtin.com/2010/why-we-host-on-american-servers/">I&#8217;ve detailed before</a>, our sites are hosted in the US. James was kind and diligent enough to do some further testing comparing Microsoft&#8217;s CDN to Google&#8217;s. He found they resolved as follows:</p>
<table>
<thead>
<tr>
<th>Location</th>
<th>Google</th>
<th>Microsoft</th>
</tr>
</thead>
<tbody>
<tr>
<th>Melbourne, AU</th>
<td>US</td>
<td>Sydney</td>
</tr>
<tr>
<th>Sydney, AU</th>
<td>Sydney</td>
<td>US</td>
</tr>
<tr>
<th>Perth, AU</th>
<td>Sydney</td>
<td>US</td>
</tr>
</tbody>
</table>
<p>If you have the chance, I&#8217;d love you to test where <a href="http://ajax.aspnetcdn.com/">ajax.aspnetcdn.com</a> and <a href="http://ajax.googleapis.com/">ajax.googleapis.com</a> resolve to for you. You can do a<br />
<samp>traceroute</samp>
<p> and you should be able to work out the destination from host names and response times. Letting me know via twitter is probably easiest, my username is <a href="http://twitter.com/pwcc/">@pwcc</a>.</p>
<p>Obviously, I should have done all this checking before writing the post. By failing to do so, I look a bit of a tit.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2011/google-cdn-is-distributed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taking the &#8220;distributed&#8221; out of CDN</title>
		<link>http://bigredtin.com/2011/google-cdn-not-distributed/</link>
		<comments>http://bigredtin.com/2011/google-cdn-not-distributed/#comments</comments>
		<pubDate>Tue, 07 Jun 2011 04:06:52 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Quick Notes]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[CDN]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://bigredtin.com/?p=1125</guid>
		<description><![CDATA[Over on Twitter @bobearth prompted me to do run some trace routes against the Google CDN and compare it to the Microsoft CDN. It appears Google have taken the distributed network out of their CDN.]]></description>
				<content:encoded><![CDATA[<p><strong>Note: After publishing this article, I was given the results of traceroutes from other Australian cities. <a title="Putting the “distributed” in CDN" href="http://bigredtin.com/2011/google-cdn-is-distributed/">The results showed I was wrong</a>.</strong></p>
<p>Over on Twitter <a href="https://twitter.com/bobearth/statuses/77929850245095426">@bobearth</a>, prompted me to run some trace routes against the Google <abbr>CDN</abbr> and compare it to the Microsoft <abbr>CDN</abbr>. It appears Google have taken the distributed network out of their <abbr>CDN</abbr>.</p>
<p>As you&#8217;re probably aware, <abbr>CDN</abbr> is an abbreviation for content distributed network. The idea behind them is that American users will be served content from a server located in the <abbr>US</abbr> or Canada, Australian users will be served content from a server located in Australia or the Pacific, and so on.</p>
<p><span id="more-1125"></span></p>
<p>Doing a trace to the Google <abbr>CDN</abbr> from the <a href="http://soupgiant.com">Soupgiant</a> <abbr>HQ</abbr> in <a href="http://maps.google.com.au/maps?q=soupgiant&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;hl=en&amp;tab=wl">Melbourne</a>, I was expecting to receive a response a server in Sydney. Instead, the response came from California, <abbr>USA</abbr> as the final steps of this <code>traceroute</code> show:</p>
<pre><samp>127.0.0.1:~ peterwilson$ traceroute ajax.googleapis.com
[snip]
 5  syd-nxg-men-crt1-ge-3-1-0 (202.7.173.241)  27.479 ms  87.472 ms  78.234 ms
 6  202.7.171.46 (202.7.171.46)  91.118 ms  31.786 ms  27.314 ms
 7  66.249.95.232 (66.249.95.232)  80.358 ms
    66.249.95.234 (66.249.95.234)  27.842 ms
    66.249.95.232 (66.249.95.232)  44.059 ms
 8  209.85.249.52 (209.85.249.52)  177.570 ms
    66.249.95.166 (66.249.95.166)  172.656 ms  157.311 ms
 9  72.14.236.126 (72.14.236.126)  172.117 ms  153.304 ms  180.227 ms
10  googleapis.l.google.com (66.249.89.95)  178.725 ms  193.939 ms  181.227 ms</samp></pre>
<p>The response from Microsoft&#8217;s CDN were more to my liking:</p>
<pre><samp>127-0-0-1:~ peterwilson$ traceroute ajax.aspnetcdn.com
traceroute: Warning: ajax.aspnetcdn.com has multiple addresses; using 70.37.159.166
traceroute to ajax.aspnetcdn.com (70.37.159.166), 64 hops max, 52 byte packets
[snip]
 7  10gigabitethernet5-1.syd-xmx-edgcom-1b.ntwk.msn.net (70.37.149.62)  90.691 ms  86.004 ms  37.900 ms
 8  ajax.microsoft.com (70.37.159.166)  71.541 ms  83.053 ms  80.586 ms</samp></pre>
<p>This prompts the question: should I switch to serving jQuery and other hosted libraries to the Microsoft <abbr>CDN</abbr>? Both Google and Microsoft use a cookie-free domain for their <abbr>CDN</abbr>s, both are set to browser cache for 12 months. More sites use Google&#8217;s <abbr>CDN</abbr> to serve, but only Microsoft serve geographically near the majority of visitors to Soupgiant and Big Red Tin.</p>
<p>&nbsp;</p>
<p>I don&#8217;t know the answer to this question. I do know that if Google&#8217;s <abbr>CDN</abbr> was distributed, there would be no question.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2011/google-cdn-not-distributed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery 1.5 as jQuery 1.5.0</title>
		<link>http://bigredtin.com/2010/jquery-15-as-jquery-150/</link>
		<comments>http://bigredtin.com/2010/jquery-15-as-jquery-150/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 02:53:48 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://bigredtin.pressgiant.net/?p=802</guid>
		<description><![CDATA[<a title="When jQuery 1.4 was released" href="http://jquery14.com/day-01/jquery-14">When jQuery 1.4 was released</a>, the Google URL being publicised by the jQuery team was <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">http://.../jquery/1.4/jquery.min.js</a> - while Google had set it up as <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js">http://.../jquery/1.4.0/jquery.min.js</a>. I had problems with this seemingly minor difference.]]></description>
				<content:encoded><![CDATA[<p>In early 2009, I wrote a post on <a title="browser caching times" href="http://bigredtin.com/behind-the-websites/caching-on-the-google-ajax-libraries-api/">browser caching times</a> for the Google AJAX Libraries API.</p>
<p>The cheat notes are that three different URLs point to the current edition of jQuery and each URL is cached in the browser for a different length of time:</p>
<ul>
<li><a title="Latest in the version 1 tree" href="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">Latest in the version 1 tree</a>: 1 hour</li>
<li><a title="Latest in the version 1.4 tree" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">Latest in the version 1.4 tree</a>: 1 hour</li>
<li><a title="Version 1.4.2 exactly" href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">Version 1.4.2 exactly</a>: <strong>1 year</strong></li>
</ul>
<p>The point of my post was that, when using Google&#8217;s AJAX Library to host jQuery, or any of the other libraries, it is best to specify the exact version to receive the full benefit of hosting on the same server as gazillions of other web sites, that being, your <a title="visitors don't need to download the library for every site they visit" href="http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/">visitors don&#8217;t need to download the library for every site they visit</a>. I was reminded of this when Dave Ward appeared on <a title="episode 32 of the official jQuery podcast" href="http://podcast.jquery.com/2010/08/27/episode-32-dave-ward/">episode 32 of the official jQuery podcast</a>.</p>
<p><a title="When jQuery 1.4 was released" href="http://jquery14.com/day-01/jquery-14">When jQuery 1.4 was released</a>, the Google URL being publicised by the jQuery team was <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js">http://&#8230;/jquery/1.4/jquery.min.js</a> &#8211; while Google had set it up as <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.4.0/jquery.min.js">http://&#8230;/jquery/1.4.0/jquery.min.js</a>. I had two problems with this:</p>
<ul>
<li>The publicised URL, coming from the official jQuery team, was only cached for 1 hour;</li>
<li>Anyone using the publicised URL would automatically be upgraded to jQuery 1.4.1 upon its release, regardless of their expectations.</li>
</ul>
<p><strong>My request to John Resig and the jQuery team is to avoid confusion by officially numbering the next version as jQuery 1.5.0 and publicising the URL that contains the full version number.</strong></p>
<p>That means that for most people the default version of jQuery they download will be updated least often. It means that the people building the websites have more control over which version of jQuery their end users download and when.</p>
<p>It may seem trivial now but if your visitors leave your site while they&#8217;re waiting for jQuery to download, you&#8217;ll think it less so.</p>
<p>I&#8217;d love to hear your thoughts in the comments below or via <a title="@bigredtin" href="http://twitter.com/?status=@bigredtin">@bigredtin</a> on Twitter. If you agree, why not let the jQuery team know <a title="via Twitter" href="http://twitter.com/?status=@jquery">via Twitter</a>.</p>
<p><strong>Update:</strong> In the blog post announcing version 1.5, the jQuery team did publicise the 1.5.0 URL on the Google CDN.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2010/jquery-15-as-jquery-150/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partying like it&#8217;s 1999</title>
		<link>http://bigredtin.com/2009/partying-like-its-1999/</link>
		<comments>http://bigredtin.com/2009/partying-like-its-1999/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 00:23:00 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://soupgiant.com/?p=226</guid>
		<description><![CDATA[Within a couple of months of writing that I prefered my own base JavaScript file to an exisiting framework, I was a convert to jQuery. Why the turnaround?]]></description>
				<content:encoded><![CDATA[<p>A little under twelve months ago I wrote a post on a JavaScript base file I&#8217;d set up:</p>
<blockquote><p>I could have used an existing frame work, such as the increasingly popular <a href="http://jquery.com/">jQuery</a>; I decided to use my own, which contains only the very basics, rather than have a larger file containing <em>rarely used functions</em></p>
<p>&#8211;<a title="Base JavaScript File" href="http://bigredtin.com/javascript/base-js-file/">source</a> (emphasis added for this post)</p></blockquote>
<p>Within a couple of months of writing that, I was a convert to jQuery. There was no single reason for my conversion, from memory some of the reasons where:</p>
<ul>
<li>the selector engine,</li>
<li>plugin availability,</li>
<li>documentation — both <a title="official" href="http://docs.jquery.com">official</a> and unofficial tutorials, and,</li>
<li>lazyness</li>
</ul>
<p>It&#8217;s the last one that probably had the biggest influence, I&#8217;m too lazy to reinvent the wheel, and without using a framework that&#8217;s what I was going to be doing. Frequently. Examples in blogs I read, weather it be group blogs, such as <a title="A List Apart" href="http://alistapart.com">A List Apart</a>, or one person shows, such as <a title="CSS-Tricks" href="http://css-tricks.com/">CSS-Tricks</a> were all beginning to use jQuery. If I were to stick to my guns and not use a framework, I&#8217;d be doing a lot of rewriting.</p>
<p>As for the functions that are rarely used? It&#8217;s really only the Ajax group of functions that I&#8217;ve never used, for the simple reason that I don&#8217;t like Ajax. In many of the situations it&#8217;s used, it is often fanciness without necessary function. Then again, ask me about Ajax in a couple of months&#8217; time.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2009/partying-like-its-1999/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Caching on the Google AJAX Libraries API</title>
		<link>http://bigredtin.com/2009/caching-on-the-google-ajax-libraries-api/</link>
		<comments>http://bigredtin.com/2009/caching-on-the-google-ajax-libraries-api/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 03:49:41 +0000</pubDate>
		<dc:creator>Peter Wilson</dc:creator>
				<category><![CDATA[Behind the Websites]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://peterwilson.cc/?p=106</guid>
		<description><![CDATA[Using the Google Ajax Libraries API, there are several options for specifying the version numbers of the library you wish to use, for example, three URLs point to the latest version of jQuery.]]></description>
				<content:encoded><![CDATA[<p>Using the <a title="Google Ajax Libraries API" href="http://code.google.com/apis/ajaxlibs/">Google AJAX Libraries API</a>, there are several options for specifying the version numbers of the library you wish to use, for example the following URLs all point to the latest version &#8211; at the time of writing &#8211; of jQuery.</p>
<ol>
<li><a href="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js</a>,</li>
<li><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js</a>, and,</li>
<li><a href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js">http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js</a></li>
</ol>
<p>The first uses the latest release in the version 1 tree, the second the latest in the version 1.3 tree, and the third the release 1.3.0 exactly. What I found interesting &#8211; and discovered accidently &#8211; is the browser caching times for each of these urls; the first two are cached for an hour, the third for twelve months.</p>
<p>The vastly different caching times make perfect sense, in the first two cases, the developer is expecting an upgrade to the latest version, and doesn&#8217;t want to wait up to twelve months for it; in the third case the developer doesn&#8217;t expect an upgrade so an extended caching period has no effect.</p>
<p>To take full advantage of the Google servers, as described in a recent article by <a title="3 reasons why you should let Google host jQuery for you" href="http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/">Dave Ward</a>, the caching times suggest it&#8217;s best to specify the full version of the library you wish to use.</p>
<h4>google.load Method &#8211; Update Jan 24, 2009</h4>
<p><span id="more-106"></span>Further investigation shows that the Google load method uses the full URL for the less specific version requests, for example the following will load <a href="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js">ajax.googleapis.com[...]/1.3.1/jquery.min.js</a>* ? at the time of writing ? and cache the file for twelve months.</p>
<pre><code>&lt;script src="http://www.google.com/jsapi"&gt;&lt;/script&gt;
&lt;script&gt;
  /* &lt;![CDATA[ */
  google.load("jquery", "1"); //latest version in the v1 tree
  /* ]]&gt; */
&lt;/script&gt;</code></pre>
<p>The jsapi file is not cached, so a additional 5K is downloaded for every page hit on your website; if a visitor loads more than three pages an hour then the advantage of the longer caching time is lost. As always, it&#8217;s a matter of compromise.</p>
<p>* A minor update to jQuery has been released since the original article was written.</p>
]]></content:encoded>
			<wfw:commentRss>http://bigredtin.com/2009/caching-on-the-google-ajax-libraries-api/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
