title: How can I ensure a dynamically-generated javascript file is never cached?
body: <p>I have a dynamically-generated javascript file that I want to ensure is NEVER cached by the browser. My current method is to simply append a (new) guid to the url in the script tag on each page view.</p>
  
  <p>For example:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/js/dynamic.js?rand=979F861A-C487-4AA8-8BD6-84E7988BD460"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>My question is...is this the best way to accomplish my goal?</p>
  
  <p>For reference, I am using ASP.NET MVC 2 and the javascript file is being generated as a result of a controller action.</p>