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
ThemeForest sell a range of site templates from some fantastic designers. They also sell some great WordPress themes!
Online invoicing made easy with CurdBee!
» Sign up
Join SugarSync for online backup. Sync your files between Mac, PC and mobile phone. Get 5 GB FREE and up to 10 GB bonus space!
HTML5 and CSS3 for the Real World will show you how to create websites using these new methods.
This easy-to-follow guide covers everything you need to know to get started. You’ll master the new semantic markup available in HTML5, as well as how to use CSS3 without sacrificing clean markup or resorting to complex workarounds. Buy the Book! · FREE Chapters
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].