为什么IE浏览器发出的随机XHR一万二千一百五十二分之四百〇八响应使用jQuery的岗位? [英] Why does IE issue random XHR 408/12152 responses using jQuery post?

查看:153
本文介绍了为什么IE浏览器发出的随机XHR一万二千一百五十二分之四百〇八响应使用jQuery的岗位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚遇到与IE浏览器存在似乎几乎没有关于'网文档中的问题 - 只有少数人问类似的问题

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.

当我使用jQuery(1.4.2),以一个POST请求发送到我的服务器(该服务器通过发送JSON数据响应),我偶尔会XHR 408错误(即服务器超时,同时等待客户端以完成其请求),以及(较少),XHR 12152错误(我不知道这意味着)。似乎没有成为一个模式了这一点。

When I use jQuery (1.4.2) to send a POST request to my server (to which the server responds by sending JSON data), I occasionally get XHR 408 errors (meaning that the server timed out while waiting for the client to finish its request), and (less frequently), XHR 12152 errors (I don't know what these signify). There does not seem to be a pattern to this.

这只是发生在IE浏览器(版本8 - 我还没有尝试过其他版本,但我可以证实,发生在两个不同的安装问题)。 Safari和Opera似乎很好。

This only occurs in IE (version 8 - I haven't tried other versions, though I can confirm that the problem occurs on two different installations). Safari and Opera seem fine.

似乎这不是要与GET请求有问题。

This doesn't seem to be a problem with GET requests.

如果任何人有这个问题的任何想法,我将非常感激。

If anyone has any thoughts on the matter, I'd be very grateful.

推荐答案

当你看到IE浏览器返回的东西状态说清楚不是HTTP状态codeS,他们实际上是Windows错误数字,通常的WinInet

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 似乎证实了 408 的含义,有一个低级别的HTTP语法问题您的浏览器和服务器之间。传统上,这个已经与ActiveX实施XMLHtt prequest和保持活动的HTTPS的问题,但具体原因是相当模糊的。

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.

您也许可以尝试让服务器集连接:关闭上XMLHtt prequests是来自于IE浏览器,看看是否有帮助?这会影响性能,遗憾的是。

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.

这篇关于为什么IE浏览器发出的随机XHR一万二千一百五十二分之四百〇八响应使用jQuery的岗位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆