Google.Load – AJAX API

I just spent a while playing around with Google’s AJAX APIs and I’ve come to the conclusion that although it has its advantages, it also has its drawbacks.

Advantages:

It’s ridiculously simple to include common JS libraries into a page.

<script src="http://www.google.com/jsapi"></script>
<script>
google.load("prototype", "1.6.1");
google.load("prototype", "1.8.3");
</script>

Is all it takes to include the latest version of these very popular libraries.
And probably the greatest advantage of all: there’s a chance that these libraries have already been loaded by the browser coming to your site and are still in the cache.

Disadvantages:

By far, the greatest disadvantage that I find is that more calls are being done to more domains. Of course www.google.com is usually available, but making multiple calls impacts performance. In Turkey, where I currently happen to be traveling by, it’s extremely noticeable.

The country’s ISP has DNS filtering and it sometimes takes up to several seconds to resolve a domain name, even if it’s www.google.com. I tried using google.load for these libraries on this site and I experienced consistently lower load times as many of the components on these pages are dependent on these libraries being loaded before fully rendering the page, the user experience was degraded until the google domain was resolved.

More about this:
http://code.google.com/apis/ajax/documentation/

  • Facebook
  • Twitter
  • FriendFeed
  • del.icio.us
  • StumbleUpon
  • Digg
  • Slashdot
  • Technorati
  • Mixx
  • Hyves
  • Faves
  • SphereIt
  • LinkedIn
  • MySpace
  • Google Bookmarks
  • Add to favorites

This message has no responses

Leave a Reply

Trackback URI | Comments RSS

Recent Images from Photostream

  • IMG_2068.jpg
  • Máquina
  • Lac Leman
  • Hills
  • Wheat
  • Sail Away
  • Alaska
  • Ambiance