Yahoo! centralizes its JavaScript network with free hosting

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.

Yahoo! UI hosting sample code

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.

  • Posted
  • Updated at
  • Comments [4]

4 comments

Commentary on "Yahoo! centralizes its JavaScript network with free hosting":

  1. Nate Koechley on wrote:

    You’re correct to note that log data will exist when people reference files hosted by us. However, we will continue to offer a downloadable distribution (zip) for people to host themselves. So, YUI may still “be for you” even if you don’t want to use our free hosting :)

    Thanks for coming tonight, it was great to see you there Niall.

    Thanks,
    Nate

    Nate Koechley
    Yahoo! User Interface Library

  2. Niall Kennedy on wrote:

    Hi Nate,
    You’re right, that sentence was confusing. Fixed to better differentiate Yahoo’s hosted version of YUI vs. the BSD, host your own, extend and have fun version.

  3. Venkk on 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?

  4. Roj Niyogi on 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