Search code examples
xmlhttprequestwebserverinternet-explorer-9embeddedwebserver

XMLHttpRequest: Double TCP SYN within a millisecond in Internet Explorer 9


the XMLHttpRequest object causes two TCP SYN Packets when I try to send some POST data. This happens in less than a millisecond. I cannot reproduce this behavior in any other browser (tested with the latest Firefox and Google Chrome browser).

Even the 'asynch' Flag or timeout setting does not seem to change the situation.

The Problem is that when IE9 sends two SYN, they will be automatically ackowledged by the Server's TCP/IP Stack. But unfortunately IE9 then sends the Post data in the second stream, which means that the web server is already waiting for bytes on the first socket (causes a timeout). This happens because we are talking about a single threaded web server that can handle one socket at once.

Any suggestions or ideas?

I would like to prevent IE9 from establishing two sockets at once.

This happens no matter if I use the Jquery ajax function or implement it by myself in java script.

Best Regards

Matthias


Solution

  • Just an idea, you could try adding a Connection: close header in all server responses to make sure the browser is starting a new tcp connection for every request.