Free Hosting of YUI Files from Yahoo!

By YUI TeamFebruary 22nd, 2007

Coinciding with this week’s release of YUI version 2.2.0, the one year anniversary of the YUI open-source release, and as announced at the YUI Party just moments ago, we’re opening up free YUI hosting from the Yahoo! network to all YUI implementers. If you’re using YUI for your own project, we’ll serve the files for you — gzipped, with good cache-control, using our state-of-the-art network, for free. You can count on these files being continuously available because they’re the same files, served by the same source, that we use for most YUI implementations at Yahoo!.

Files served from Yahoo!’s network include version numbers in filepaths, allowing you to reference a specific version in your code. Previous versions are retained even as new versions are released. While we are providing no explicit SLA with respect to the availability of legacy code, our current policy is to support permanent availability of legacy YUI files.

Why Provide YUI Hosting on Yahoo!’s Network?

We’re opening up the service of YUI from Yahoo! servers for the same reasons we open-sourced YUI in February: Yahoo! is quintessentially a web company. The progress being made by developers in richness and usability today is healthy for the web and, by extension, good for Yahoo! We want to do everything we can do to enhance that evolution — whether it’s opening up YUI, hosting YUI files, or creating best-of-breed APIs like the recently-announced Browser-Based Authentication system.

At the end of the day, this step has a small incremental cost to Yahoo! while providing a valuable ease-of-implementation advantage to many developers. Serving YUI from Yahoo! servers won’t be the right decision for all implementers; if you’re aggregating or customizing YUI source code and serving it from a highly performant host, there will be little reason to switch. However, for some implementers the provision of free, robust, edge-network hosting will have significant upside.

What Are the Benefits of Having Yahoo! Host YUI Files?

Yahoo!’s network is located throughout the world. HTTP requests for YUI files are evaluated to determine their geographic source and then served from in-region server farms wherever possible. This edge-computing system provides shorter round-trip times for packets as compared to the use of centralized network hosts. Because YUI files (consisting of JavaScript files, CSS files, and image resources) are static, there need be no relationship between the server providing these files and the server holding session information and business logic for a given application. Moving these files off a central server and closer to your users, therefore, should make your application more responsive overall.

Moreover, Yahoo!’s hosting network is configured to serve JavaScript and CSS using gzip compression. We minify YUI JavaScript before pushing it to our servers; in combination with gzipping, this results in a 90% reduction in transmitted filesize as compared to the footprint of YUI’s raw (and commented) source. CSS files weigh 60% less on the wire using gzip compression. If your current host does not support mod-gzip or mod-deflate, the advantages of using Yahoo! hosting could be dramatic. (See "YUI: Weighing in on Pageweights" for a full discussion of YUI filesizes.)

Finally, far-future Expires headers are issued on all static content. This HTTP response header directs the browser to retain content in cache (and to access it from the cache) as long as possible. Improving your cache hit rate will reduce the amount of time your users spend waiting for files to download.

What About Privacy?

Usage of this service will be recorded in Yahoo!’s Web traffic logs. We can assure you that our intent is simply to provide a convenience to the YUI developer community. If the record left in Yahoo!’s logs would compromise the privacy of your users, do not use this service.

* * * * *

For complete information about how to include YUI files hosted by Yahoo! in your project, please see "Serving YUI from Yahoo!" on the YUI website. We hope this resource proves useful to those of you developing rich internet applications with YUI.


  1. [...] Recently, Yahoo announced they would allow free hosting of their Yahoo! User Interface (YUI) JavaScript and CSS libraries to any site which used them. After seeing the announcement, I read several posts which declared this the best thing ever for JavaScript libraries, and that this meant Yahoo had “won” the library wars. Yahoo promises gzip compression, smart caching, and the stability of the Yahoo network if you embed their javascript and css files. [...]

  2. [...] YUI has been my favorite AJAX library for two reasons: its unintrusiveness to the server side, and the excellent documentation. It is interesting and encouraging to see Yahoo offer free hosting for YUI. While there are obviously valid reasons for some sites not to use this service (external dependency etc.), the power of yahoo’s server facility, the advanced cache control, and the on-the-fly file size reduction (up to 90% according to the announcement linked) are in no doubt going to be very appealing to many others. [...]

  3. [...] Yahoo! is going to be hosting the YUI files on their edge networks for anyone to use. This is a nice service. It means that you can rely on their fast network, smart caching (Expire/Cache-Control), and smart compression. [...]

  4. [...] Free Hosting of YUI Files from Yahoo! Following in the footsteps of Dojo, which offered up free hosting of its JavaScript library thanks to AOL late last year, Yahoo! is allowing developers to link to the YUI library files on its own servers for free. (tags: yahoo! javascript) [...]

  5. [...] Bueno, esto de hostear la libreria no debe supuestamente elevar demasiado los costos de los servidores (como es mencionado en el blog oficial de la YUI[]) y les dara una mejor reputacion entre los grupos geek y los webmaster que podria ayudar bastante con los resultados de busqueda en su buscador (la ganancia seria mucho mas grande que el gasto xD) [...]

  6. [...] Free Hosting of YUI Files from Yahoo! Compressed, versioned, the whole-nine. Seems cool. [...]

  7. Finally a move that will unify a lot of the javascript/AJAX development efforts online. I think YUI (with free hosting sweet sweet sugar) is what Java was (and is) to PC based development – a freely available, well documented development platform for creating robust, consistent and great looking applications.

    I officially love the folks at Yahoo! Good job! I couldn’t have done it better myself ;)

  8. Its a cool idea. It would have been good, if Yahoo! could have provided some rough statistics to show time saved with their gzip compression and edge computing.

  9. One thought: I wonder how many browser and browser extensions or security features block scripts that are on sites other than the main page that is being loaded.

    Here is one person who was discussing that, so there may be a general perception that it is insecure to allow 3rd-party scripts to load.

    Blacklists, whitelists, and security (Adblock plus blog)

    Does anyone know if they are blocked commonly?

  10. Thanks, Nate. Fascinating stuff.
    Up to 90% compression?
    I’ll be sure to check it out.

  11. [...] Use a content distribution network (CDN) like Akamai where your (static) content is served from distributed data centers located nearer to your client. Even if your website is not as big as Google you can profit from faster response times by using the YUI library’s own CDN. [...]

  12. Never knew that yahoo does such a great work! My respect to yahoo. I’m really impressed!

  13. This is a smart move and one that may see YUI become the premier JavaScript library…

  14. You’re also right about code-cohabitation: We think being a good Page Citizen is important which is a primary reason for our YAHOO global object.Thank you

  15. Thanks to Yahoo for making the interface library and we do hope that it remains in Open source license as many of our sites use them.

  16. Really impressive. Thanks a lot.
    free hosting for everyone :P

  17. [...] Yahoo has offered to freely host their YUI JavaScript framework for anyone to use. They configure it with all the performance suggestions they suggest, and version it in case you don’t get to update your code as and when they introduce new builds. [...]

  18. Thanks folks. Great effort. This is a very good gesture.

    This could be one of the reasons Yahoo’s satisfaction survey went up more than G’s.. :)

    Again awesome effort on the yui and hosting it for all.. thanks.

  19. [...] Free Hosting of YUI Files from Yahoo! Awesome! Yahoo is allowing developers to serve up the YUI JavaScript, CSS, and image assets directly from their edge servers. Tags: yui, yahoo, javascript, hosting [...]

  20. [...] Free Hosting of YUI Files from Yahoo! Awesome! Yahoo is allowing developers to serve up the YUI JavaScript, CSS, and image assets directly from their edge servers. Tags: yui, yahoo, javascript, hosting [...]

  21. [...] Free Hosting of YUI Files from Yahoo! Awesome! Yahoo is allowing developers to serve up the YUI JavaScript, CSS, and image assets directly from their edge servers. Tags: yui, yahoo, javascript, hosting [...]

  22. Any updates about the missing
    HTTPS Support for YUI file hosting?

  23. Administrator said:
    December 7, 2007 at 11:28 am

    @Thorleif Wiik,

    We have no current plan to support HTTPS hosting. If yours is a secure environment we recommend hosting YUI files yourself.

    You can download the entire library here:


  24. [...] nice not having to host the javascript library we’re using to build the client’s [...]

  25. Why don’t you make a script to send all the files in one request such as:,json/json.js,logger/logger.js

    * Makes one request
    * Avoids specifying version on each file
    * You can put the source files wherever you like without affecting users

    This way, you don’t break your own performance rules and saves even more bandwidth (client) and can easily add some scripting to correct bugs or collect better statistics

  26. [...] Today, I read how Google Hosts Popular Javascript Libraries and gives access to them through its CDN, the same way YUI is distributed through Yahoo! CDN since February 2007. [...]

  27. [...] of months back, Yahoo was the first to announce something like this when they said they would host their YUI library for you so it is good to see others getting into this. Share [...]

  28. if you start supporting HTTPS, please consider recommending people to use Common Internet Scheme Syntax instead of explicitly specifying http or https.

    For details, welcome to my blogpost:

  29. HTTPS is not supported at this time :(

  30. if you start supporting HTTPS, please consider recommending people to use Common Internet Scheme Syntax instead of explicitly specifying http or https.