AJAX Libraries API: Speed up your Ajax apps with Google CDN
You will notice that the version used was just "1". This is a smart versioning feature that allows your application to specify a desired version with as much precision as it needs. By dropping version fields, you end up wild carding a field. For instance, consider a set of versions: 1.9.1, 1.8.4, 1.8.2.
Specifying a version of "1.8.2" will select the obvious version. This is because a fully specified version was used. Specifying a version of "1.8" would select version 1.8.4 since this is the highest versioned release in the 1.8 branch. For much the same reason, a request for "1" will end up loading version 1.9.1.
Note, these versioning semantics work the same way when using google.load and when using direct script urls.
By default, the JavaScript that gets sent back by the loader will be minified, if there is a version supported. Thus, for the example above we would return the minified version of jQuery. If you specifically want the raw JavaScript itself, you can add the "uncompressed" parameter like so:
google.load("jquery", "1.2", {uncompressed:true});
In addition to Google's APIs for search, maps, feeds and translations, you can now access AJAX libraries that add useful features like drag-and-drop, controls, animations or easier DOM manipulation. You can use Google as a fast proxy, but Google also caches the files related to iGoogle gadgets, the feeds that are served by Google Reader, and we should expect to see more content that can be accessed from Google faster and more reliably.
For a full listing of the currently supported libraries, see the documentation.
No comment yet
-
Pingback from 1Google AJAX Libraries API WordPress Plugin » D' Technology Weblog: Technology, Blogging, Tips, Tricks, Computer, Hardware, Software, Tutorials, Internet, Web, Gadgets, Fashion, LifeStyle, Entertainment, News and more by Deepak Gupta. says:May 31st, 2008 at 2:43 am
[...] May 31, 20082:43 am Google AJAX Libraries API WordPress Plugin The Google Ajax Libraries API WordPress plugin make it easy to use the Google hosted libraries without the need to mess with [...]
