title: client-side file caching
body: <p>If I understand correctly, a broswer caches images, JS files, etc. based on the file name. So there's a danger that if one such file is updated (on the server), the browser will use the cached copy instead.</p>
  
  <p>A workaround for this problem is to rename all files (as part of the build), such that the file name includes an MD5 hash of it's contents, e.g.</p>
  
  <pre><code>foo.js -&gt; foo_AS577688BC87654.js
  me.png -&gt; me_32126A88BC3456BB.png
  </code></pre>
  
  <p>However, in addition to renaming the files themselves, all references to these files must be changed. For exmaple a tag such as <code>&lt;img src="me.png"/&gt;</code> should be changed to <code>&lt;img src="me_32126A88BC3456BB.png"/&gt;</code>.</p>
  
  <p>Obviously this can get pretty complicated, particularly when you consider that references to these files may be dynamically created within server-side code.</p>
  
  <p>Of course, one solution is to completely disable caching on the browser (and any caches between the server and the browser) using HTTP headers. However, having no caching will create it's own set of problems.</p>
  
  <p>Is there a better solution?</p>
  
  <p>Thanks,
  Don</p>