Moin,

Kyle Simpson (@gettify) asked me via twitter if I would like to be a BETA tester for his new service 2static.it. For sure I was testing. Actually the private BETA will last for 7 to 14 days.

It’s ” … a free service for improving the page-load performance of your site by addressing one specific performance detractor — cookies on static asset requests.”. If you are using YSLow this is the point “Use cookie-free domains”. I was setting this up and it works perfectly. I will post about it later.

Watching YSlow giving me better and better grades for my personal website http://www.nms.de, I thought it would be cool to go further and also make some more adjustments. The next step was to set expire headers. The point in YSlow is “Add expires headers”. This is as simple as this:

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Expires "Thu, 15 Apr 2020 20:00:00 GMT"
</FilesMatch>

Place this in your apache2.conf or VhostContainer and restart apache. Now apache is setting an expire header for the matched files in the far future. But be careful. You now have to rename the files when you update them. This should not be that difficult. You could add a version number for example.

Another issue are ETags. In YSlow this is “Configure entity tags (ETags)”. ETags are used for checking out if a ressource in the browsers cache is the same than on the server. If you are not using this meachanisim, the advice is to turn it off - either in your apache conf or in the VhostContainer:

FileETag none

The other rules are more onpage optimization (beside “Use a Content Delivery Network (CDN)). With a little luck, you will get a B or A grade - yeah ;-)

Andy