Yahoo YUI wins JavaScript Library Wars
February 23rd, 2007There is huge web development news from Yahoo today. Yahoo is offering free hosting for YUI components, both JavaScript and CSS. I’ve been favoring the YUI, but this is a great boon. One big drawback to AJAX is Page loading performance. I’m betting that the Yahoo infrastructure can serve these files way faster than most people’s servers, they are much more likely to be cached, and by being located on a different domain, they circumvent domain connection limits in the browser. By offering hosting, Yahoo turns YUI into a true shared library for the internet.
February 23rd, 2007 at 1:51 pm
Yahoo’s site hiccups and thousands of apps all fail to load.
Yahoos own survey stated that 40-60% of Yahoo!’s users have an empty cache experience and ~20% of all page views are done with an empty cache.
http://yuiblog.com/blog/2007/01/04/performance-research-part-2/
What good is this really? If you gzip YUI and use its selective components the size hit isnt that much.
February 23rd, 2007 at 1:55 pm
As for the “Library War” title. I got a chuckle out of your sensationalist headline, but the “war” is far from over. There are too many good players from the likes of Prototype, MooTools, jQuery and Dojo.
February 23rd, 2007 at 3:49 pm
I thought I would jump in early on the prediction bandwagon. Don’t you see how this works? If I’m right, I can link to this post and brag about how prescient I was, If I’m not, then I can just forget about it.
Anyway, the hosting is the difference between being just another library and being ubiquitous. Name another JS library with common hosting. There are many marginal uses of JavaScript that would not warrant adding a JS library to the page weight that become possible now.
As I’ve been doing more and more with YUI, I can tell you there are things that I couldn’t use it for before that I can use it for now. Of course, I have to do some testing with Tamper Data to make sure. Also, I assume that Yahoo will release some cache hit stats after some time.
This isn’t about file size or bandwidth, Its about latency and browser connection management, as explained in the page loading performance post that I linked to and the YUI blog itself.
February 23rd, 2007 at 7:14 pm
http://jquery.com/src/jquery-svn.js
February 23rd, 2007 at 7:19 pm
jQuery compressed is 19.9kb, gzipped is less than closer to 10kb I believe,
Prototype compressed is 21.8k gzipped around 11.9kb or so.
With todays connection speeds is 10kb really a big deal?
Browser connection limits: use subdomains or wild card dns to get around them:
http://www.ajaxperformance.com/?p=33
February 24th, 2007 at 6:36 am
10 kb is a big deal - still a lot of people have slow connections or temporarily slow connections. On top of this, pages that loads faster gives more responses (sign ups, etc.)…
However I’d at any time prefer to have my code on MY server.
February 25th, 2007 at 1:14 am
“Name another JS library with common hosting.”
dojo:
http://ajaxian.com/archives/hosting-javascript-on-cdns-aol-announces-the-hosting-of-dojo
February 25th, 2007 at 8:48 am
Maybe since picking YUI, I’ve been seeing the world through Yahoo colored glasses? I looked up Yahoo on Alexa, which reports their reach as 27%. I thought it would be higher (although alexa may not be representative). Perhaps there isn’t as much caching opportunity here as I had thought?
I don’t think that jQuery url is intended for hosting. Can someone point me to some official linkage and from AOL with a TOS that specifies that its acceptable for 3rd parties to link Dojo from their CDN, something like Yahoo YUI Hosting TOS?
July 8th, 2008 at 6:13 am
YUI has not won the war. No one has yet, and when i decided to switch to using a framework i used Prototype and Scriptaculous. I tried jQuery first but the fact it returns an object of itself using the shortcut method is stupid! Prototype returns an extended element of using document.getElementById() - much much much better.
Anyway, you then went on about how YUI provides free hosting… look up googles api’s - they offer them all complete with gzip, cdn’s etc. But even so, it’s still faster to deliver them from your own site if you enable gzip, minimize it, and include ALL your JS files in to a single file. It saves the time of a DNS lookup etc and extra downloads of your other js files.
For more on the speed impact of .js files and frameworks including google api’s… checkout this article i wrote: http://www.coderprofile.com/coding-article/107/
Kind regards,
Scott