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.
https://stackoverflow.com/questions/7842530/ie-9-30-second-ajax-post-requests
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:
Within 500ms, my server responds (Rails/Apache/Phusion Passenger)
IE immediately sees the body of the response (as shown in the Developer Tools Network Tab)
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?