title: JS/AJAX browser caching issue
body: <p>I am working on an eshop with a calculator to calculate your loan. I need some fresh insight on this... imagine this situation:</p>
  
  <ol>
  <li>User clicks on one of the buttons it will do a POST request (jQuery) and fill the required data.</li>
  <li>User clicks <strong>add to cart</strong> and goes to cart</li>
  <li>User clicks <strong>back</strong> button (browser)</li>
  </ol>
  
  <p>Page is loading, server is filling the data in the calculator (default), BUT after its done, browser fills the JS data from cache and a funny thing happens. The data gets combined and when user adds the product to his cart he will get wrong, but valid price. Valid part is what server fills and the rest comes from cache.</p>
  
  <p>I have tried using meta tags to prevent caching, I have told jquery to <strong>not</strong> cache the POST request and even in my responder, I have multiple headers that say - <strong>DO NOT CACHE</strong>. Yet still the POST data gets cached and I have no idea how to turn it off or refresh it or whatever... When I look at the headers that come back with the json data, header <strong>expires</strong> is set to year 2099, even though I have said it should be a year from past. Apart from that, I really dont know what could be causing this issue.</p>
  
  <p>Here are the headers set in responder and what gets back:</p>
  
  <pre><code> header("Expires: Mon, 26 Jul 1999 05:00:00 GMT" );
   header("Last-Modified: " . gmdate( "D, d M Y H:i:s" ) . "GMT" );
   header("Cache-Control: no-cache, must-revalidate" );
   header("Pragma: no-cache" );
   header("Content-type: text/x-json");
  </code></pre>
  
  <p>This gets back (from firebug):</p>
  
  <pre><code>    Date         Fri, 17 Sep 2010 08:39:38 GMT
      X-Powered-By PHP/5.1.6
      Connection Keep-Alive
      Content-Length 126
      Pragma         no-cache
      Last-Modified Fri, 17 Sep 2010 08:39:38GMT
      Server         Apache
      Content-Type text/x-json
      Cache-Control no-cache, must-revalidate
      Expires         Mon, 26 Jul 2099 05:00:00 GMT
  </code></pre>
  
  <p>Note: when I disable cache in browser preferences it works like a charm.</p>
  
  <p>Any ideas are welcome!</p>
  
  <p>Edit:</p>
  
  <p>I have tried the dummy few hours before, but that doesnt solve it. To put it simple the whole problem is that when user clicks back button, the page <strong>wont</strong> refresh, but its read from cache, or at least the data that came from ajax are cached and get filled.</p>
  
  <p>So basically I need to refresh the page in a smart way when user clicks back button. Note that cookies are not an option, because (maybe a small percentage, but still) some people dont have cookies allowed.</p>