title: Control Browser Caching of Generated JavaScript
body: <p><strong>Background</strong></p>
  
  <p>An MVC 4 application needs to include JavaScript that is generated from the database.  The generated file is relatively large, and changes only occasionally (changes every 2-10 days).</p>
  
  <p>The accepted answer of</p>
  
  <p><a href="https://stackoverflow.com/q/8133546/141172">Generate javascript file on the fly in asp.net mvc</a></p>
  
  <p>provides a good framework for generating the JavaScript.  However, the URL of the JavaScript resource is static.  As I understand it, the browser will cache that resource.  That caching can be controlled by the <code>OutputCacheAttribute</code>.  </p>
  
  <p><strong>Question</strong></p>
  
  <p>How can I cause the browser cache to expire whenever the generated JavaScript changes, similar to the way that bundles work?  A <code>SqlDependency</code> for the <code>OutputCacheAttribute</code> is not an option.</p>