jb's Blog
"behold the turtle, he only makes progress when he sticks his neck out"
YSlow using IIS?
07 Aug 2007 14:56
Indeed!
Recently Yahoo put out a developer tool to snap into
Firebug
called
YSlow
. It analyzes a given web page and generates a marked score for a number of "performance traits" of the site. If a page can be improved, YSlow gives some tips on what can be improved.
The other day Simone put up
a horrid post
listing my blog as having a
D
ranking?!? What the...
So I had a nosey to see what he was on about and low and behold, there were definitely some areas for improvement.
Ok - so thats better! Maybe I should migrate to Akamai?
If you are using IIS 6 like me, you are likely to be failing on a couple of the rules:
3. Add an Expires header (for resources such as CSS/JPG)
This one is fairly easy. Browse to the directory holding your resources, select the properties, select the HTTP Headers tab and then enable Content Expiry. Set a number of days sometime in the future (e.g. 30).
4. Gzip components (for resources such as JS/CSS)
Firstly enable GZIP by right clicking on the Web Sites folder and selecting the Service tab. Check the appropriate boxes. I normally just enable static file compression.
Next edit the Metabase.xml in %windir%\system32\inetsrv (you will need to enable Direct Metabase editing for this on the properties for the top level node in IIS Manager)
Find the section named HcFileExtensions (there will be 2 of them) and modify them to include any static resources you want compressed.
Mine looks like this:
HcFileExtensions="htm
html
txt
js
css"
You will need to do an IIS reset to finish off and you might want to disable Direct Metabase Editing as well :)
13. Configure ETags
This one on the face of it is quite annoying, that is until I found
this article
! Compile the code using Visual C++, or just
download a binary version
.
You can install it into IIS by adding a new ISAPI filter (either at the Web Sites level or to a specific site), it will show as unknown initially, which is fine. Make sure you allow the filter to run by adding it as the
same name
into the Web Service Extensions and set the extention to be allowed.
You will need to do an IIS reset to finish off.
And done! Your site now should be much better off to deal with that impending Slashdotting :)
comments (8)
history
2006 (47)
2007 (79)
January 2008 (5)
February 2008 (17)
March 2008 (7)
April 2008 (4)
May 2008 (1)
June 2008 (6)
August 2008 (1)
blogs i read
JDs Weblog
Andrews Blog
Chris Auld
Josh Robb
Ivan Porto Carrero
Rod Drury
Nic Wise
Alex James
Darryl Burling (MS)
Nigel Parker (MS)
Sean McBreen (MS)
links
Mindscape
Intergen
rss feed