Developing software in the Real World


I've been playing recently with YSlow! from Yahoo! and it's quite cool. It's a plug-in for Firefox that works in combination with Firebug that gives you pointers as to why your site isn't as fast as it could be.

I noticed that one site that I'm developing at the moment was rated C, so thought I'd see what I could do easily to improve it. These are the items that I sorted out.

Configure ETags

[notes] ETags are related to caching and don't seem especially useful from the notes, so I turned them off in my .htaccess:

GZip Components

[notes] For Apache 2.x, mod_deflate can be used to compress the text data that is sent to the browser. I enabled it in my .htaccess using:

Note that the Apache docs have better configuration settings if you need to support older browsers and other edge cases.

Add an Expires Header

[notes] The Expires header tells the browser when to look for a new version of a given file. mod_expires is the Apache module required and the .htaccess settings I've used are:

Note Don't use the expires statements when developing!


There you have it. Some simple Apache configuration settings to help improve the performance of your website.

As usual, comments, criticisms and suggested improvements very welcome!