如何在 Ajax 请求中解决 Firebug 的“Aborted"消息? [英] How to solve Firebug’s “Aborted” messages upon Ajax requests?

查看:17
本文介绍了如何在 Ajax 请求中解决 Firebug 的“Aborted"消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Firefox 14.0.1 上使用 Firebug 1.10.2.显示网页时,Firebug 插件具有以下行为":基于 Ajax 请求的 Firebug 的中止"消息.

I am using Firebug 1.10.2 with Firefox 14.0.1. When showing a web page, the Firebug add-on has this "behavior": Firebug’s "Aborted" message upon Ajax request.

我应该做什么?由于存在某些错误,或者是 Firebug 错误或其他原因,我必须改进我的 Web 应用程序是否如此危险?

What should I make? Is it so dangerous that I must improve my web application because the presence of some error, or it is a Firebug bug or something else?

推荐答案

请查看 XHR open() 的文档,例如这里:https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest

Please see the documentation of XHR open() for example here: https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest

注意:调用这个方法是一个已经激活的请求(一个open() 或 openRequest() 已经被调用)相当于调用 abort().

Note: Calling this method an already active request (one for which open()or openRequest()has already been called) is the equivalent of calling abort().

只要您需要,就创建一个新的 XHR 实例.更好的是,使用 jQuery 或其他 JS 库来执行 AJAX.它应该可以保护您免受这些错综复杂的影响.

Just create a new XHR instance whenever you need one. Better yet, use jQuery or other JS library to do AJAX. It should shield you from these intricacies.

这篇关于如何在 Ajax 请求中解决 Firebug 的“Aborted"消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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