I wanna be six
March 5th, 2010Why use Google hosted jQuery
March 4th, 2010Here are the benefits of using the Google hosted jQuery libraries:
- By using the Google hosted jQuery libraries, since many applications use the Google infrastructure, when someone comes to your application, the Google hosted files may already be loaded into the visitor’s browser cache.
- The subtle performance issue associated with the transfer of cookie data is revolved because your domain is different from Google’s (i.e.,: not google.com), so no cookie data or other verbose headers will be sent up, saving precious bytes.
- By loading the jQuery libraries from Google, the HTTP requests for those libraries don’t compete with the requests for assets from your domain, speeding up the overall page load time:
“Browsers typically limit the number of concurrent HTTP connections per server to be 2. If a browser session has two HTTP connections already [for a given server], any further connection requests will have to wait until one of these two HTTP connections is finished.” — Source: OpenAjax Alliance - Google hosted files are compressed using GZIP.
- Google has a distributed CDN at various points around the world, so the files are “close” to the visitor.
- Google servers are fast.
Here’s the drawback:
- In the highly unlikely event that Google’s CDN goes down, the missing jQuery libraries will prevent your jQuery dependent page from loading correctly. The fix for this is to alternatively load the jQuery library from somewhere else. Microsoft now hosts the jQuery library on their CDN.
Here’s an example of alternate loading. Try loading from Google. Check for the presence of the jQuery function. If it isn’t there, load jQuery from Microsoft.
<script type=”text/javascript”>
if (typeof jQuery !== ‘function’) {
document.write(‘<scri’ + ‘pt type=”text/javascript” src=”http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js”></scri’ + ‘pt>’);
}
</script>
If both Microsoft and Google are down, then the world must be at an end, so your site not loading is the least of your problems.
Stuck snow angel
March 2nd, 2010Learning to ski
March 2nd, 2010This was only her second time skiing. She’s destined for the olympics.
Snow is fun…
February 28th, 2010Tahitian Dance?
February 25th, 2010Three legged race
February 25th, 2010Post snow crash
February 21st, 2010The end of chionophobia
February 21st, 2010Attack of the playground
February 16th, 2010Playground 2 : our girls 0
On the left, notice the welt on her forhead. She tripped and fell right onto hrr forhead while running across the basketball court.
On the right, she monkey bar’ed until her palms blistered and popped. Each hand has a bare patch of exposed “new” skin the size of 50c coin near the base of palm. Ouch. Or as she put it, “owowowaaahhhhhhh, it — hurts — so — baaaaad!” My poor girlies.












