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/

         
Written on January 10th, 2010 , Tech talk

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

If I had a world of my own, everything would be nonsense. Nothing would be what it is because everything would be what it isn't.
And contrary-wise; what it is it wouldn't be, and what it wouldn't be, it would. You see? -- Lewis Carroll, Alice in Wonderland

WestonHankins.com

experiences, imagination, creation: life