1
无法从Android 4.2设备中的异步Ajax调用获取响应。每次都会超时异步Ajax调用无法在Android中获得响应
xhr = $.ajax({
type: 'GET',
url: url,
async: true,
contentType: "application/json",
timeout : 20000
});
xhr.done(function(data, status, xhr) {//This never gets invoked.});
它总是超时。但是如果它的async : false
能够在2秒内得到最大响应。
好的,谢谢你的链接,但让我困惑的是我有2台服务器(一台使用基本的HTTP认证进行安全保护),90%的时间在安全服务器上失败。但它确实会在一段时间内回复。 – GoodSp33d