title: Navigate with location.href during XMLHttpRequest asynchronous call
body: <p>I have a web page containing something like this:</p>
  
  <pre><code>&lt;div onclick="location.href = 'AnotherPage';"&gt;
  </code></pre>
  
  <p>This page also uses asynchronous XMLHttpRequests for some ajax updating.</p>
  
  <p>I have found that while an asynchronous XMLHttpRequest is in progress, clicking on this div does not load the new page. If I cancel my request first then it works fine. This seems wrong, but I cannot find any documentation that describes what <em>should</em> happen.</p>
  
  <p>So the question is: what should happen to asynchronous XMLHttpRequests in progress when a new page is loaded using location.href?</p>
  
  <p><em>edit - I worked around this problem by handling window.onbeforeunload and aborting my pending async request there. The question remains though, whether I should need to do this?</em></p>