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.
For example:
<script type="text/javascript" src="/js/dynamic.js?rand=979F861A-C487-4AA8-8BD6-84E7988BD460"></script>
My question is...is this the best way to accomplish my goal?
For reference, I am using ASP.NET MVC 2 and the javascript file is being generated as a result of a controller action.