I loved Jeremy Keith’s post about inlining CSS – which I’m doing on this site, but not nearly as well as he spells out.
That post also gave a good tip about making a small .htaccess change to cache-bust CSS and JS files without using query strings or coupling a version-number-in-a-file to the HTML. The way I’d been doing it required changing at least two things every time I updated the CSS here.
However, I found that for my .htaccess, I needed to do something a little different from the rewrite he suggests:
# RewriteRule ^(.).(d).(js|css)$ $1.$3 [L] # His
RewriteRule ^(.*)\.([0-9\-]+)\.(js|css)$ $1.$3 [L] # Mine
The whole .htaccess is in this gist, for clarity’s sake. Please do make suggestions for improvements.