title: Detect XHR error is really due to browser stop or click to new page
body: <p>While my page is loading content via XHR, if the user clicks the stop button or clicks to go to another page, the XHR error() function is called. This wouldn't normally be a big deal except for the user shock of seeing lots of (red) error messages on the page.</p>
  
  <p>The messages are valid - there was indeed an error retrieving the content - but it's due to the user interaction, not because of a system failure.</p>
  
  <p>Is there a way to distinguish between a (404 | 500 | timeout error) and an error caused by the fact that the user hit the browser's stop button ?</p>
  
  <p>EDIT: I am using Dojo (hence the error function reference), but I believe this would be a situation that is common across any XHR implementation. I will look into readyState of the xhr object when error() is called</p>