title: XMLHttpRequest onreadystatechange long delay between readyState 1 and 2
body: <p>My JS code is sending out requests and monitors "xhr.onreadystatechange". Sometimes it will collect the following logs, which are expected:</p>
  
  <pre><code>timestamp   event   method  readyState  status
  1/9/2018 9:08:43.474    xhr_readystatechange    POST    1   0
  1/9/2018 9:08:46.432    xhr_readystatechange    POST    2   200
  1/9/2018 9:08:46.432    xhr_readystatechange    POST    3   200
  1/9/2018 9:08:46.433    xhr_readystatechange    POST    4   200
  </code></pre>
  
  <p>Other times it will collect the following logs, which are not expected: (in this case, readyState never changed to 2 within the 22 seconds before my app timed out)</p>
  
  <pre><code>timestamp   event   method  readyState  status
  1/11/2018 21:36:25.390  xhr_readystatechange    POST    1   0
  1/11/2018 21:36:47.249  localSend           failed
  </code></pre>
  
  <p>I understand that:</p>
  
  <ul>
  <li>readyState 1 means xhr.open is called but xhr.send has not been called</li>
  <li>readyState 2 means xhr.send has been called and response header is received</li>
  </ul>
  
  <p>My question is: if readyState changed to 1 but never changed to 2/3/4, was my POST request actually:</p>
  
  <ul>
  <li>never sent on the wire (xhr.send has not been called)? If so, what might have caused this? Could the request be dropped by xhr.send inside the browser JS engine?</li>
  <li>or, sent to the server but got stuck there for whatever reason (so response header is not ready).</li>
  </ul>
  
  <p>Note this is on IE 11.</p>
  
  <p>Thanks,</p>