title: Onreadystatechange not not working after header redirection in Chrome
body: <p>I have made a userscript for a forum that resizes images. It works great, except for after posting or editing where it redirects, where <code>onreadystatechange</code> does not fire in Google Chrome.</p>
  
  <p>When viewing a thread, EG <em>SomeSite/forums.php?action=viewtopic&amp;topicid=205362</em>, the userscript works.</p>
  
  <p>After editing/posting, EG <em>SomeSite/forums.php?action=viewtopic&amp;topicid=205362&amp;page=p4976670#4976670</em>, the userscript doesn't work.</p>
  
  <p>The problem lies with this code:</p>
  
  <pre><code>document.onreadystatechange = function () {
  if (document.readyState == "complete") {
      //Call function
  }};
  </code></pre>
  
  <p>I wait for all resources to be loaded, because the resizing is inconsistent otherwise on pages with many images.</p>
  
  <p>The script works perfectly in Firefox with Greasemonkey. </p>
  
  <p>Any idea why <code>onreadystatechange</code> does not fire on Chrome after a redirect? Is there a better way to wait for resources to have been loaded?</p>