0
我目前正在使用phonegap編寫HTML5和Zepto.js的移動應用程序。我們的服務器在rails上使用ruby。在Playbook(測試設備)上,應用程序在此屏幕上凍結了大約20%的時間。如果發生這種情況,它將不會響應,並且頁面將在拖動時滾動(通常禁用的內容)。我們很確定這是對我們的服務器的ajax調用。這裏的電話:如何解決我的ajax調用崩潰我的移動應用程序?
$.ajax({
url: myurl+ajaxData+'&callback=?',
dataType: 'json',
async: true,
callback: "callback",
success: function(body) {
if (body.status === "successful"){
successful();
}
else {
var errstring = body.status + ": " + body.result
console.log (errstring);
alert(errstring);
}
},
error: function(xhr, type) {
var errorstring = type + ": " + xhr.status + "\n" + xhr.statusText + "\n" + xhr.responseText;
alert (errorstring);
console.log (errorstring);
storage.setItem("retrieved", "false");
}
})
有沒有人知道可能是什麼原因造成的?