递归 Ajax 调用在 IE11 中不起作用
Recursive Ajax Call not working in IE11
我正在尝试使用 $.ajax jquery 方法进行背靠背 ajax get 调用(因为我的 JSON 数据约为 2MB),它在 Chrome 中工作正常,但 IE11 似乎在 understand.In IE11 中不起作用,它落在 ajax 的失败方法上,在其中一个递归调用中 & 之后它退出递归。我在失败事件中调试并悬停在 responseText 上,它给了我带有反斜杠
的字符串(long json 的对象之一)
[{\"row_index\":\"401\",\"value\":\"Greece\",\"system\":true,\"global\":true}]
然而,它在chrome中工作正常,即使在网络监视器IE11中,它也没有反斜杠响应。在 IE11 控制台中,它显示没有反斜杠的字符串
var myArray =[];
function recursiveAjax(j){
//where requestIds is like ["2","5", "1"] (list of ids)
$.ajax({url:myURL + JSON.stringify(requestIds) + "&point1="+range[j].start+"&point2="+range[j].end +"&cacheUniq=" + (new Date()).getTime(), dataType: "json", type:'Get', cache:false, success: function (data) {
myArray.push(data)
if(j < range.length-1 )// Where range is populated array of object
{
j++;
recursiveAjax(j);
//setTimeout(recursiveAjax(j),500*j);
}
});
})
}
recursiveAjax(0)
我在我的 json 数据中发现了一个特殊字符,它导致错误事件仅在 IE11 中触发
�
我正在尝试使用 $.ajax jquery 方法进行背靠背 ajax get 调用(因为我的 JSON 数据约为 2MB),它在 Chrome 中工作正常,但 IE11 似乎在 understand.In IE11 中不起作用,它落在 ajax 的失败方法上,在其中一个递归调用中 & 之后它退出递归。我在失败事件中调试并悬停在 responseText 上,它给了我带有反斜杠
的字符串(long json 的对象之一)[{\"row_index\":\"401\",\"value\":\"Greece\",\"system\":true,\"global\":true}]
然而,它在chrome中工作正常,即使在网络监视器IE11中,它也没有反斜杠响应。在 IE11 控制台中,它显示没有反斜杠的字符串
var myArray =[];
function recursiveAjax(j){
//where requestIds is like ["2","5", "1"] (list of ids)
$.ajax({url:myURL + JSON.stringify(requestIds) + "&point1="+range[j].start+"&point2="+range[j].end +"&cacheUniq=" + (new Date()).getTime(), dataType: "json", type:'Get', cache:false, success: function (data) {
myArray.push(data)
if(j < range.length-1 )// Where range is populated array of object
{
j++;
recursiveAjax(j);
//setTimeout(recursiveAjax(j),500*j);
}
});
})
}
recursiveAjax(0)
我在我的 json 数据中发现了一个特殊字符,它导致错误事件仅在 IE11 中触发
�