YSlow - a mini summary

Recent days, i started queueing my blog reading. The good part about it is that i am able to get a lot more done during the week. The bad part is that i am missing cool news. One such news is that YSlow - firefox extension - was released late last month.
Y Slow is a great firefox plugin that analyzes a website and gives a report card. In this page, yslow creator outline what the thought process behind the report card is. When you install yslow and run it on a site, you get a grade for your site. For each of the 13 items you see on the “rules page”, there is a grade assigned in yslow and overall grade is a summary of those. This is a great tool, very valuable. I was able to look at various aspects of my website - www.nesteggr.com - and figure out what i can be doing better.

Couple of things to note. The scoring in these rules seems to be heavily biased towards 3 specific rules

  • Rule #1 - Make fewer http requests. This one is obvious, the fewer the http requests, the faster your site will load. The usual culprits here are the css background images, css stylesheets, and javascript files.
  • Rule # 3 - Add an expires header. For the static content, this is the right thing to do. The time suggested by yahoo is 10 years, but for most smallish website developers - especially ones still in development - months would be a better timeframe it seems. For me few months got an A on YSlow for this rule.
  • Rule #14 - Configure ETags. The rules page posts an explanation of why Etags are bad for sites that have multiple webservers serving the same content. However, it never comes out and says that you should turn off ETags. But that is what they recommend. Turn off ETags.

I have few suggestions for improvement. For a smallish website that runs on one webserver, i don’t think that this scoring systems is fully useful. Most people won’t be able to afford a CDN, why penalize the score for that? Also, for folks running on a single server, ETags may be a better way to manage the browser side cache support (rules #3 and #13) instead of the “far future expires header”. With ETags, you don’t have to change file names, incorporate version control etc, to bust client side cache. On sites with multiple servers, using an ETag without the inode-time-stamp would also work better.

Here are ways ySlow can better

  1. Have a check box to disable the CDN rule/grade as a not applicable to me
  2. Recognize Etags as valuable. Dont just give an F for site with ETags. May be ask if the site is running on one webserver. If it is running on one webserver, etags should score higher than expires headers.
  3. ask if the site is running on multiple servers, if so, user should specify how to hit different servers. May be then, CDN score automatically is included, and ETags are checked for consistency across multiple servers.

Overall this is a great tool. Hope they keep improving it.

Leave a Reply

enter this word: drona