title: Firefox caches whole page state inlcuding javascript variables
body: <p>Firefox seems to save the whole page state including values of javascript variables and DOM and restoring it when user hits back button.  How to prevent this behaviour? </p>
  
  <p>Cache on server side prevented:</p>
  
  <pre class="lang-php prettyprint-override"><code>header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
  header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
  header("Cache-Control: no-cache,no-store,private,must-revalidate,max-stale=0,post-check=0,pre-check=0");
  header("Pragma: no-cache");
  </code></pre>
  
  <p>All forms on page have <code>autocomplete='off'</code>, all hidden input elements have it too.
  <code>onload</code> event is not fired.</p>
  
  <p>Is there any way to tell Firefox totally forget page state after form submission?
  setting timeout in onsbumit handler which will force page reload is a bad idea, because next page can react in unpredictable time. In case of long response reload will break the request. </p>
  
  <p>How to reproduce:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;body&gt;
    &lt;form method='POST' action='http://httpbin.org/post' autocomplete='off'&gt;
      &lt;input type='text' placeholder='Enter something' name='data'  autocomplete='off'/&gt;
      &lt;input type='hidden' name='token' value='and_token_field_that_must_not_be_cached' autocomplete='off'/&gt;
      &lt;input type='submit' /&gt;
    &lt;/form&gt;
    &lt;span id='counter'&gt;&lt;/span&gt;
    &lt;script&gt;
      var tick = 0;
      setInterval(function () {
        document.getElementById('counter').innerHTML = tick ++;
      }, 300);
    &lt;/script&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Wait a bit, press submit, then back. FF will display the same counter value as before page submission, Chrome will reset it.</p>