title: Is it the filename or the whole URL used as a key in browser caches?
body: <p>It's common to want browsers to cache resources - JavaScript, CSS, images, etc. until there is a new version available, and then ensure that the browser fetches and caches the new version instead.</p>
  
  <p>One solution is to embed a version number in the resource's filename, but will placing the resources to be managed in this way in a directory with a revision number in it do the same thing? Is the whole URL to the file used as a key in the browser's cache, or is it just the filename itself and some meta-data?</p>
  
  <p>If my code changes from fetching <code>/r20/example.js</code> to <code>/r21/example.js</code>, can I be sure that revision 20 of <code>example.js</code> was cached, but now revision 21 has been fetched instead and it is now cached?</p>