【发布时间】:2011-09-22 00:01:33
【问题描述】:
由于我的请求中有太多超时错误,我想以千字节为单位获取 ajax 答案的大小。我怎样才能做到这一点?感谢您的帮助。
请求是这样的:
$.ajax({
url: domain+'index.php?fx_action=ajax&fx_mode=aaa&fx_id='+id,
type: 'POST',
dataType: 'json',
timeout: 5000,
beforeSend: function () {
var currentTime = new Date()
window.time2b = currentTime.getTime();
},
error: function (xhr, ajaxOptions, thrownError) {
showErrorContainer();
appendError("function fname(params) : "+thrownError+", "+xhr.responseText);
return false;
},
success: function (data) {
【问题讨论】:
标签: php javascript jquery html ajax