What's the best way to version CSS and JS URLs?
- by David Eyk
As per Yahoo's much-ballyhooed Best Practices for Speeding Up Your Site, we serve up static content from a CDN using far-future cache expiration headers. Of course, we need to occasionally update these "static" files, so we currently add an infix version as part of the filename (based on the SHA1 sum of the file contents). Thus:
styles.min.css
Becomes:
styles.min.abcd1234.css
However, managing the versioned files can become tedious, and I was wondering if a GET argument notation might be cleaner and better:
styles.min.css?v=abcd1234
Which do you use, and why? Are there browser- or proxy/cache-related considerations that I should consider?