title: Cache Buster Strategy in ASP.Net
body: <p>What is a good strategy for automatically applying and/or updating cache buster variables on my javascript and stylesheet references in an ASP.Net website?</p>
  
  <p>E.g. Transforming</p>
  
  <pre><code>&lt;script type="text/javascript" src="/js/myScript.js" /&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;script type="text/javascript" src="/js/myScript.js?rev=12345" /&gt;
  </code></pre>
  
  <p><strong>UPDATE: Continuous Integration is not required.</strong>
  <strike>I am using continuous integration (Jenkins to be specific), so it would be great if the method for updating the variables was based on the build number for instance.</p>
  
  <p>While I can live with applying the original variables manually in the source code and just updating them via the strategy, it would be a nice addition if the strategy could also apply the original variable if it did not already exist (say to legacy code).</p>
  
  <p>Off the top of my head, I can imagine using a Powershell script that scans through all *.aspx and *.ascx files and uses a regular expression to find the appropriate references and update them. But you know what they say about using regular expressions... then I have two problems :)</strike></p>