I was looking at the UX London website recently and I noticed that their CSS files are referenced with a query string like this:
<link rel="stylesheet" type="text/css"
href="/css/screen.css?20090108" media="screen">
The query string [20090108] looks like the date. This seems to be a rather neat method of preventing style sheet caching when your CSS changes. It’s not something that I have come across before but it’s a clever idea implemented by Jeremy Keith and Natalie Downe at Clearleft.
Update: Confirmed on adactio’s Twitter stream
Join SugarSync for online backup. Sync your files between Mac, PC and mobile phone. Get 2 GB FREE and up to 10 GB bonus space!
Flexible Web Design by Zoe Mickley Gillenwater describes how to build fluid and elastic CSS layouts. It's a great read!
Buy from Amazon.com · Amazon.co.uk
Daniel Botting 14 February 2009, 23:57 1
Interesting article, does the query string need to be added to every page or just the homepage?
Many thanks
Clive Walker 15 February 2009, 10:26 2
You will need to ask the original authors about this but the UX London website uses it on all pages [at least, all the pages I looked at].