minify strategy - pt 2

2007-11-13 @ 08:33#

i recently outlined my suggested minify strategy for JS and CSS files here in this blog. it included the following:

  1. combine all like files (JS/CSS) into a single document
  2. minify that document using a command-line tool (JSMin and my own CSSMinify)
  3. confirm that HTTP Compression is applied to the download request for these files

things have changed slightly. first, i now use the conflate service on my web server to handle the combining of files on the fly - very fast and efficient as it also handles compression and (left out of my previous plans) caching. that means i only need to get aggressive about producing minified versions of the CSS and JS files in order to complete my strategy. and that's just a matter of habit.

another issue that will come up soon is versioning the cached files. now that i'm marking the files cache-able for 30 days, any updates to those files will not be flushed to the clients unless i make some clean break with the older version of the file. the solution? using version names/dates in the output files. that will take a bit more planning as it will include altering any references to those files in other pages/projects (potentially tedious work).

so i guess i have a bit more work to do, eh?