IE10/IE11 Abort Post Ajax 请求在清除缓存后出现错误“网络错误 0x2ef3" [英] IE10/IE11 Abort Post Ajax Request After Clearing Cache with error "Network Error 0x2ef3"

查看:32
本文介绍了IE10/IE11 Abort Post Ajax 请求在清除缓存后出现错误“网络错误 0x2ef3"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SCRIPT7002:XMLHttpRequest:网络错误 0x2ef3,无法完成由于错误 00002ef3 导致的操作

SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3

目前没有有效的解决方案.

更新:在 IE11 上也注意到了.

Update: Noticed on IE11 also.

经过越来越多的调查,我得出了这个结果:

After more and more investigation, I come with this results:

  1. 这个问题是我的应用程序特有的,它不会发生在 facebook 上.
  2. 这个问题与每个主机的最大请求数无关(我做了淹没服务器的示例页面,IE10 能够同时处理多达 8-10 个请求,在我的应用程序中我也尝试过这样做ajax 请求串行,它也失败了).
  3. 问题是 POST 请求特有的.
  4. 问题不是特定于所使用的 JS 库(我尝试从控制台直接 XMLHttpRequest 也失败了).
  5. xhr.send(), xhr.readyState = 4 和 xhr.onreadystatechange 触发后失败.
  6. 失败与任何内容类型、正确的请求或服务器配置无关.它只是客户端,请求虚拟页面会失败,只有最低 XHR,只有 xhr.open 和 xhr.send.
  7. 主要发生在清除浏览器缓存后.
  8. 在 POST 之前执行 GET 请求并不能解决此问题.

我的问题是:

  1. 浏览器缓存如何影响 POST ajax 请求?
  2. 是否有任何机构与 IE 开发人员联系,告诉我们此错误网络错误 0x2ef3"映射到什么?

目前我正在做的临时解决方案是,如果 HTTP 状态代码为零,则最多重试 3 次.但这很丑陋,因为有时甚至上传请求都会失败,并且对于那些有重试的请求会变得很慢,有时会花费额外的100ms.

For now the temporary solution I am doing is simply retry for a max 3 times if the HTTP status code was zero. But it is very ugly because even upload requests sometimes failed, and it become slow for those requests with retry, sometimes it will take extra 100ms.

重现步骤:

  1. 确保 fiddler 或代理已禁用.
  2. http://ie10.laiths.name/#!login
  3. 打开 IE10 控制台,删除浏览器缓存.
  4. 试试这个无效的登录:random@rand.com/random
  5. 3-4 次(清除缓存/无效登录)后,您将看到此错误:SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, 由于错误 00002ef3 无法完成操作.

我的 IE 版本:

  • Win7 IE10 版本:10.0.9200.16618
  • 更新版本:10.0.6 (KB2838727)

如果 浏览器是 IE10 &&,现在我最多重试 3 次来解决它请求是POST &&HTTP 状态码为 0.

For now I am solving it by retrying a max of 3 times if the browser is IE10 && Request is POST && HTTP status code is 0.

如果有人可以帮助我删除我丑陋的解决方案,我将不胜感激,因为使用这样的解决方案,即使请求发送到服务器并返回 0,我也会重试(我试图通过测量之间的时间来避免这种情况xhr.send 及其回调,但它不可靠),如果 IE10 在 comptMode 下怎么办,如果 IE11 有同样的问题怎么办,再加上该性能,每次重试之间将在我的机器上花费约 170 毫秒.

I would appreciate if somebody can help me to remove my ugly solution, because with such solution even if the the request goes to the server and it returns 0 I will also retry (I was trying to avoid that by measuring the time between xhr.send and its callback but it is not reliable), what about if IE10 in comptMode, what about if IE11 has same problem, add to that performance, it will take on my machine ~170ms between each retry.

推荐答案

这可能是由于安全证书问题而发生的.如果您清除缓存,您会丢失部分(如果不是全部)证书信息.

This can be happening due a security certificate issue. If you clear the cache you loose part (if not all) of certificate information.

您可以在 http://www.jonnyreeves.co.uk/2013/making-xhr-request-to-https-domains-with-winjs/

基本上它说您必须在您的 POST 请求之前执行 GET 才能更新证书信息.

Basically it says you must do a GET before your POST request in order to update the certificate information.

这篇关于IE10/IE11 Abort Post Ajax 请求在清除缓存后出现错误“网络错误 0x2ef3"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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