Why does IE issue random XHR 408/12152 responses using jQuery post?

前端 未结 2 1676
逝去的感伤
逝去的感伤 2020-12-31 19:47

I\'ve just come across a problem relating to IE that there seems to be virtually no documentation about on the \'Net - only a few people asking similar questions.

Wh

相关标签:
2条回答
  • 2020-12-31 20:14

    I solved it by adding "Connection: close" to ajax header also.

    There is no need to add "Connection: close" to the response header from the server.

    I have tested firing 1,000 requests.

    0 讨论(0)
  • 2020-12-31 20:17

    When you see IE returning things in status that clearly aren't HTTP status codes, they're actually Windows error numbers, typically from WinInet.

    12152 ERROR_HTTP_INVALID_SERVER_RESPONSE would seem to confirm the 408's implication that there's a low-level HTTP-syntax problem between your browser and the server. Traditionally this has been a problem with the ActiveX implementation of XMLHttpRequest and keep-alives in HTTPS, but the exact cause is rather murky.

    You could perhaps try having the server set Connection: close on XMLHttpRequests that come from IE, see if that helps? This will affect performance, unfortunately.

    0 讨论(0)
提交回复
热议问题