Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is a repost of the following SO question because I'm pretty convinced that this is a networking/server issue, and not something wrong with my code.

Here's the gist: When making an AJAX request in IE9 (and the 7/8 compatibility modes) via GET or POST the following events occur:

  1. Within 500ms, my server responds (Rails/Apache/Phusion Passenger)

  2. IE immediately sees the body of the response (as shown in the Developer Tools Network Tab)

  3. IE then waits until the timeout period has passed before it shows the headers (again in the Dev Tools) and notifies my Javascript.

As stated in the SO question, it looks like my server (or perhaps the networking layer in Windows 7) isn't closing the request until the timeout period has passed.

It works perfectly in all other browsers that I have tested. Does anyone have any idea why this might be happening?

share|improve this question
up vote 0 down vote accepted

Okay, so after much screwing around, I found out that sending an AJAX GET request a few hundred milliseconds after the POST seems to fix the issue. Not sure why, but it seems to close the previous connection first and let it finish.

So, my solution is as follows:

didSend: function(request, response) {
  if (SC.browser.msie && request.get('type') === "POST") {
    setTimeout(function() {
    }, 500);

And everything appears to work. I would still love to find out the actual problem, but seeing as the XMLHttpRequest object is waiting to call readystatechanged for some stupid reason...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.