SCRIPT7002:XMLHttpRequest:网络错误 0x2ef3,由于错误 00002ef3 无法完成操作 [英] SCRIPT7002: XMLHttpRequest: Network Error 0x2ef3, Could not complete the operation due to error 00002ef3

查看:24
本文介绍了SCRIPT7002:XMLHttpRequest:网络错误 0x2ef3,由于错误 00002ef3 无法完成操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在执行一些 Ajax 调用时不断收到此错误...

I keep receiving this error when I do some Ajax calls...

它甚至可能与地理编码有关,但我真的不知道如何捕获错误以显示对用户有用的东西......甚至如何解决问题,因为它似乎只是在引用某种指针或其他东西:S 0x2ef3

It may even be something to do with Geocoding but I really have no idea how to capture the error to display something useful to users... or even how to solve the problem as it seems to just be referencing some kind of pointer or something :S 0x2ef3

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

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

图像可能比错误消息更有帮助:

An image might be more helpful than the error message:

有什么想法吗?

我的代码在 1 秒内触发了 10 个 ajax 调用,由地理编码服务器端处理.

My code fires off 10 ajax calls in 1 second to be processed by geocoding server side.

错误间歇性出现.有时我会得到地理编码的结果,有时我会得到那个错误.我会说我有 10% 的时间得到它.它完全阻止了 ajax 调用在 jQuery 中触发我的错误处理程序.

The error comes up intermittently. Sometimes I get geocoded results and sometimes I get that error. I would say I get it 10% of the time. It completely stops the ajax call from firing my error handler in jQuery.

推荐答案

这是对我有用的修复.与您的 json 数据一起发送的无效 mime 或错误字符集导致该错误.添加这样的字符集以帮助它避免混淆:

This is the fix that worked for me. There is invalid mime or bad characterset being sent with your json data causing that errror. Add the charset like this to help it from getting confused:

$.ajax({
  url:url,
  type:"POST",
  data:data,
  contentType:"application/json; charset=utf-8",
  dataType:"json",
  success: function(){
  ...
  }
});

参考:

Jquery - 如何使 $.post() 使用contentType=application/json?

由于错误 c00ce56e 无法完成操作

这篇关于SCRIPT7002:XMLHttpRequest:网络错误 0x2ef3,由于错误 00002ef3 无法完成操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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