title: Under what circumstances is $(document).ready triggered on a back-button click?
body: <p>I'm working with some code that uses JQuery's $(document).ready functionality to set up a jqGrid instance. It appears that the code is fired even when returning to the page via a back-button click. </p>
  
  <p>In a stripped-down test page, a similar ready function is <em>not</em> called when reached via a back-button click:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;script type="text/javascript" src="/JQuery/jquery-1.4.2.min.js"&gt;&lt;/script&gt;
  
      &lt;script type="text/javascript"&gt;
  
      $(document).ready(function(){
          alert('ready');
      })
  
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;Index View&lt;/p&gt;
  
      &lt;a href="detail.html"&gt;Detail&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can you give me some hints of where to look for what is causing this difference in behavior?</p>
  
  <p>I found some related information in an answer to <a href="https://stackoverflow.com/questions/158319/cross-browser-onload-event-and-the-back-button/170478#170478">this question</a>, but the page with the overactive ready event doesn't have an event handler registered for unload. </p>