title: Javascript - Scroll page to last position of previous page when the back button is hit
body: <p>I decide to make my own "neverending" scroll page which suits exactly my needs rather than making comfortable with some extensive classes that could not have to work exactly the way I would like them to.</p>
  
  <p>Now, when all works like a charm, last thing remains. Preserve the scroll position when the browser's back button is hit. Every time you get to the bottom of the page I change the hash # part of the url. When the back button is hit, it shows waiting icon and then loads dynamic content.</p>
  
  <p><strong>Firefox</strong> scroll after that exactly to place the page was scrolled (good).</p>
  
  <p><strong>Opera and Safari</strong> seem to load exactly the same state there were before, so dynamic content seems to be already prefetched and displayed (good).</p>
  
  <p><strong>But IE and Chrome</strong> want to scroll before dynamic content is load and they don't try again later. IE get stucked at the top of the page and Chrome somewhere in the middle (bottom of the page before dynamic content shows up).</p>
  
  <p>Now, what could I do to solve this issue? I could in theory store the current scroll position to url hash when any click is detected. Then previous page is load and I could simply parse the hash and ScrollTop(). But for some reason, this</p>
  
  <pre><code>$(document).live("click", function() { window.alert("gotcha"); });
  </code></pre>
  
  <p>doesn't work for me anyway.</p>