The Lair

Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup

yslow site profiling

YSlow is an extension to Firefox. Actually, that’s not quite right. YSlow is actually an extension to Firebug, an awesome extension which runs on Firefox. Its purpose is to find out why your site is slow. YSlow. Geddit? Geddit? Never mind then.

Despite being just a tiny bit suspicious of cookie-cutter recommendation tools, I gave it a whirl. I like it. YSlow gives a useful overview and is certainly a great introductory tool to profile a site. There are some recommendations made that can be safely ignored; but that takes nothing away from the tool itself. As always though, the application/site developer (ie:, you) should know best about what might work and what won’t. In my personal opinion, rules are ok to break so long as you know why you’re breaking them.

Install and enable the extension (firebug must be installed first) and visit any site. Once the site has finished loading on your browser, YSlow will do it’s thing and provide a spiffy little report. Each criteria (there are 13 in total) has a specific letter grade; with A being the best and F being a fail. Note: There is no T grade for Troll and no S grade for Slashdotted.

Although an overall grade of C might seem rather bad, it actually isn’t. When the extension first came out, most sites seemed to score a D grade. That doesn’t detract from the fact that further performance tweaks can be made, of course. I still haven’t done anything with etags, for example. The series of YDN blog entries discussing the rules starts here. A fascinating read.

There are a few places where the YSlow plugin is giving somewhat unrealistic (or overly generic) advice however. Nowhere is this more apparent than scoring an F for not using a Content Delivery Network. Because, umm… Akamai is awesome, but not exactly cheap.

Two other !A grades, both of which I was aware. I deliberately set the expiry of the CSS and JS files on the site to a low value - just cached them for a single week. Considering that I roll out updates fairly frequently, I thought that was appropriate. Even more relevant considering that some browsers (*cough cough* Opera) have a slightly broken caching mechanism. The arcane mod_headers and mod_expires syntax that I was forced to read up on did come in handy to fix the expiry for other elements on the page though.

I also refrained from gzipping the JS. Older browsers apparently have issues handling CSS and JavaScript which isn’t sent in cleartext. Both these considerations are very much site dependent though. Other sites may actually want to do things differently and gain a speedup.

The YSlow stats tab is also a useful extra but this stuff can also be found in other Firefox development extensions such as WebDeveloper Toolbar.

The very nice thing about YSlow is that you can configure the extension to weight the criteria in any way you prefer. Each criteria has a weightage; and these weights are adjustable. Fire up about:config and filter all the yslow properties.

Tweak the numbers and you can figure out a site grading that is most appropriate to the type of site that you’re running. For example, few small/mid-range sites really care (or can afford) CDN services.

All in all, though - YSlow is a very useful addition and a great place to start in tuning a site to deliver content faster.

“yslow site profiling” has 3 comments

  1. Gravatar

    University Update - Firefox - yslow site profiling wrote:

    [...] Contact the Webmaster Link to Article firefox yslow site profiling » Posted at The Lair on Thursday, August 02, 2007 [...]

  2. Gravatar

    Curious Yellow wrote:

    dude, is your e-mail bork3d?

  3. Gravatar

    drac wrote:

    Eh. Not that I can tell, but I’ve been having lots and lots of spam recently. Sent you a mail anyway.

Just say it

*Required
*Required (This site supports gravatars)