The News
I first heard about the new Google AJAX Libraries API from Jeremy Schoemaker’s blog. He mentions using it to reduce WordPress bandwidth, but really it can be used to reduce bandwidth in most AJAX based web development environments.
The Exciting Part
I persoanlly use prototype the most, and I’m extremely excited that I can use their libraries instead of uploading my own for each site. I’m especially excited that calling specific version numbers is possible. This makes upgrading a code set extremely simple, especially if you call the code version as a variable at the beginning of your code.
Realistically your javascript code is probably one of the lightest weight parts of your code, but every little bit helps, especially if you’re serving a large amount of users every month.
Optional Settings
Script Compression
I think one of the greatest optional settings for all of the scripts you can load is compression. It’s not available for all of the APIs, but it is for most. What it does is remove all of the whitespace from the API to reduce file size for the end user – increasing speed. If you mix that with something like the javascript compiling on Google Chrome and you’ll have lightning fast AJAX applications.
No CSS
You can optionally remove the CSS from the scripts you’re remotly loading, which allows you to do one of three things: load the default CSS, load your own CSS, or not load the CSS at all.
Resources
WordPress.org: Google AJAX Libraries API Plugin – This plugin uses the GALA whereever possible in your WordPress installation.
Google AJAX APIs Blog – This is a great place to go if this really iterests you and you’ll be using this code regularly. They’re always adding new scripts to the API, so if you don’t see the one you want yet, keep an eye on their blog.
Subscribe
Facebook
Twitter
Digg
Sphinn
LinkedIn
Leave a Reply