title: Javascript detect when page goes
body: <p>There is a way to detect when the page is being redirected?</p>
  
  <p>Example, I put a timeout for X seconds and if the page wasn't redirected (the user still in the page) it will kill the timer except if the page is being redirect... because some redirections can be freeze (delay, lazy)... so it will re-program the timer instead of kill it...</p>
  
  <p>the readystate will change if the page is on a redirect?</p>
  
  <p>How to detect if the page is on a redirect using javascript?</p>
  
  <p>Thanks</p>