Yahoo! is opening up the JavaScript powering its websites a bit more tonight, encouraging developers to directly reference libraries on its servers from within their webpages. Yahoo! User Interface Hosting opens up versioned access to the popular YUI Library, creating faster load times for sites across the web using Yahoo's optimized, geo-distributed, and reliable data centers.
Many websites utilize common libraries for JavaScript development, creating a drop-down menu, file retrieval, or chart rendering using a library such as Prototype, script.aculo.us, dojo, and many others. If five Ruby on Rails sites utilize the same script.aculo.us library for effects you'll have to download the same file(s) five times from each of the five different domains. Centralized resources such as YUI Hosting create a single download source requiring one file download regardless of the number of sites taking advantage of the YUI library.
Yahoo! is a global company and spends a lot of money serving up web content as fast as possible in London, San Francisco, or Tokyo. The central YUI files are on that same network, creating a shorter path from a user's browser to required files needed to enhance a website. Pulling files from a separate domain also creates an opportunity for more parallel content downloads, circumventing the two requests per host limit in Firefox and Internet Explorer.
Yahoo! will be logging each request and its page origination, so if you are worried about privacy and providing pageview numbers to outside sources the hosted version of YUI may not be for you (grab a download, host your own).
A web widget feature
Version 2.2 of YUI, released on Tuesday, includes support for a new global variable named YAHOO.env. Web widget developers can reference this variable to determine if YUI is already present on the page for additional functionality or before loading a conflicting library. It's a useful feature for blog sidebars, letting your widget peacefully co-exist with a del.icio.us, Flickr, or MyBlogLog widgets/badges without unnecessarily weighing down the page.
Summary
I think the Yahoo! Interface Library will continue to gain traction thanks to its heavy development, extensions, and documentation. It's already being used by large sites such as The Wall Street Journal and SmugMug and across the revamp of the Yahoo! network, which are some key votes of confidence important in new technology adoption.


4 Comments
Commentary on "Yahoo! centralizes its JavaScript network with free hosting":
Subscribe to new comments
Nate Koechley on February 22, 2007 at 11:33 PM wrote: #
? Niall Kennedy on February 22, 2007 at 11:52 PM wrote: #
Venkk on February 26, 2007 at 10:09 AM wrote: #
I'm curious to know if the two requests per host rule is applicable to AJAX request from the page -- requests originating from XmlHttpRequest?
I assume its two concurrent requests per domain. right?
Roj Niyogi on March 2, 2007 at 1:15 AM wrote: #
The geographic load balancing is a great feature and does work. I tested it from here in India and the domain resolves to an IP in Mumbai. Good stuff!
Roj
Add a comment
Some comments may be placed in a moderation queue to ensure topical relevancy. You may contact author Niall Kennedy directly if you prefer to comment privately.