Update: It should be added that Google’s CDN provides SSL support whereas Yahoo’s does not. If you were previously hosting your own set of YUI files to use in a secure environment, the Google CDN may be a way to offload that bandwidth and improve performance.
Google has been hosting some of the popular AJAX libraries for awhile, and we’re pleased to announce that YUI has now been added to that roster. Now, you can choose between
ajax.googleapis.com when you evaluate your hosting options for YUI files. We’ve added Google as an option in the CDN section of the Dependency Configurator; it’s easy to configure your implementation and switch the generated URLs from one source to the other.
There are two things to keep in mind in working with the Google CDN, particularly if you’re currently using Yahoo’s CDN:
If you’re using YUI Loader to bring in your YUI files, it’s a simple thing to switch to Google’s servers using YUI Loader’s
base configuration option. Here’s what you would do to pull the YUI DataTable and its dependencies from the Google CDN using YUI Loader:
The Dependency Configurator will generate this script for you; simply load this configuration and switch to the “Dynamic Loading with YUI Loader” tab.
Thanks to Vadim Spivak at Google and Dion Almaer (now at Mozilla) for helping to make this additional option available to the YUI developer community. We love that Google is supporting web developers in this way — grabbing YUI files from Google’s global infrastructure is a fantastic option to have.