I decided to go one better and make it a plugin, for those who are intimidated by code or just pressed for time.
So here’s the current readme, which is short and to-the-point (so unlike me!):
CSS Cache Buster does one very simple but very powerful thing: it ensures that your WordPress blog delivers the very latest version of your CSS stylesheet to your visitors, no matter how often or how rarely you edit your CSS.
You no longer need to worry that you’ve made a CSS change that others won’t see because of caching issues at their end.
Technically, this plugin automatically appends a last-modified date/timestamp to the end of your stylesheet url.
And since this feature is applied as a filter, you don’t have to touch your theme files. It just works.
If that makes sense to you — and if you’re a developer I sure hope it will — here’s the big fat download button:
This plugin live here, and on this page:
The CSS Cache Buster plugin is installed in the standard way:
- Download the plugin and unzip the contents (the php file and the readme.txt file)
- Upload `css-cache-buster.php` to the `/wp-content/plugins/` directory
- Activate the plugin through the ‘Plugins’ menu in WordPress
- That’s it! Nothing else to do. Breathe a long sigh.
- 12 Sep. 2008 — v0.5 beta