title: how to wait until page redirect finishes
body: <p>I'm trying to do a redirect, then perform additional operations on the markup of the new page. How can I make sure that the additional stuff I want wait until the redirect is <strong>finished</strong>?</p>
  
  <pre><code>window.location.replace(url);
  //call additional stuff here
  </code></pre>
  
  <p>I'm hoping for something that's more reliable than just waiting by x number of seconds. </p>