title: Disable browser caching for inline javascript retrieved via jquery load
body: <p>The system setup as follows:</p>
  
  <p>Page is a normal html page served from server. Once page loads, a jquery load request is made to a controller on server which is spring mvc. Controller then sends down a freemarker template with the rest of the page content (note this is placed in div).</p>
  
  <p>The freemarker template itself has some javascript file includes (i.e., </p>
  
  <pre><code>&lt;script type="text/javascript" src="..."/&gt;. 
  </code></pre>
  
  <p>So I read that doing a ajax load this way, the javascript files are going to be inlined in the page, rather than treated as external files. My question then is how best to tell the browser not to cache these javascript files as getting them refreshed while developing often requires actually clearing the cache manually versus just force reloading the page.</p>
  
  <p>Would appending a timestamp to the javascript includes work in this case (i.e., </p>
  
  <pre><code>&lt;script type="text/javascript" src="somefile.js?v=(timestamp)"&gt; 
  </code></pre>
  
  <p>or setting </p>
  
  <pre><code>$.ajaxSetup({ cache: false });
  </code></pre>