my latest
Rambling: 323 days of failure - read it
Fri 19th Nov
Tweet: kevbaldwyn: Not sure I can be bothered with updates about what we are up to so here is my summary of Nepal: it's beautiful.
Sun 22nd Jan
Code: Image and resource caching with htaccess - read it
Wed 23rd Mar
my photos
Hassan II Mosque, Wide Angle - Casblanca
Hassan II Mosque, Front - Casblanca
Hassan II Mosque, Polarised - Casblanca
Hassan II Mosque - Casblanca
Casablanca
The magical world of Disney
The Disney Castle
Snowy Branch
 

About This Site {Me}

A sketched avatar representing Kev Baldwyn

I spend a lot of time building websites, writing code, getting excited about things on the interwebs, pushing pixels around a screen and generally being a bit geeky. I also try to be cool and do other things like spend time with my girlfriend, kitesurf and take photos of things.

Image and resource caching with htaccess

Wednesday 23rd March '11

This is as much a bookmark for myself as anything. I just discovered this .htaccess trick to easily set resource caching with apache. It requires mod_headers enabled which comes compiled by default but switched off. Then all you need do is add something like this to your .htaccess file:

<IfModule mod_headers.c>
	<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf)$">
	Header set Cache-Control "max-age=2592000"
	</FilesMatch>
</IfModule>

Which will cache images and flash for one month. The link posted above has loads more info.

some things for my friends

LE BAR: The diary in full

Le Bar Diary page 1 - 2
Le Bar Diary page 3 - 4
Le Bar Diary page 5 - 6