title: Better way to prevent browser caching of JavaScript files
body: <p>This is how we prevent caching of JS and CSS files by browsers.  This seems slightly hacky..  is there a better way?</p>
  
  <pre><code>&lt;%
  //JSP code
  long ts = (new Date()).getTime(); //Used to prevent JS/CSS caching
  %&gt;
  
  &lt;link rel="stylesheet" type="text/css" media="screen" href="/css/management.css?&lt;%=ts %&gt;" /&gt;
  &lt;script type="text/javascript" src="/js/pm.init.js?&lt;%=ts %&gt;"&gt;&lt;/script&gt; 
  &lt;script type="text/javascript" src="/js/pm.util.func.js?&lt;%=ts %&gt;"&gt;&lt;/script&gt; 
  </code></pre>
  
  <hr>
  
  <p>Update: The reason we want to prevent caching is to ensure the newer version of the files are loaded when we do a new release.</p>