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

查看:22
本文介绍了IE10/IE11 在清除缓存后中止 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:网络错误 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 在清除缓存后中止 Post Ajax 请求并出现错误“网络错误 0x2ef3";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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