Load YUI-CSS from the Google Ajax Library

0

I’m using Google CDN to load my Ajax libraries specifically jQuery and jQuery UI. Its been working great but I’m often annoyed that I have to load Yahoo!’s YUI-CSS files from the yahoo CDN. However I recently found that I did not need to do this. Google also maintains the YUI-CSS files which can be accessed using the following URL:

http://ajax.googleapis.com/ajax/libs/yui/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css

which is equivalent to:

http://yui.yahooapis.com/2.8.0r4/build/reset-fonts-grids/reset-fonts-grids.css

Since DNS lookups are cached, keeping the number of domains to a minimum gives you a small performance boost.

“The Domain Name System (DNS) maps hostnames to IP addresses, just as phonebooks map people’s names to their phone numbers. When you type www.yahoo.com into your browser, a DNS resolver contacted by the browser returns that server’s IP address. DNS has a cost. It typically takes 20-120 milliseconds for DNS to lookup the IP address for a given hostname. The browser can’t download anything from this hostname until the DNS lookup is completed.”

Read more at Yahoo!

"Load YUI-CSS from the Google Ajax Library" was published on December 7th, 2009 and is listed in My Work.

Follow comments via the RSS Feed | Leave a comment | Trackback URL

DeliciousFacebookDiggRSS FeedStumbleUponTwitter

Leave Your Comment