隐藏/看不见的Ajax请求? [英] Hidden/invisible Ajax request?

查看:283
本文介绍了隐藏/看不见的Ajax请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能编写和创建一个JavaScript Ajax请求女巫不能用Firebug的插件在Firefox?

Is it possible to write and create a JavaScript Ajax request witch cannot be catched by the Firebug plugin in Firefox?

我问这个,因为我可以在Facebook上看到,有没有Ajax请求回事,但还是当我发一条消息,从另一个帐户,在顶部的消息框,将增加1封未读邮件指示器。 ..怎么样,即使这可能才达到?

I'm asking this because I can see on Facebook that there are no Ajax request going on, but still when I sent a message from another Account, the message box on the top will add the "1 unread message" indicator... How's even this possible to achive?

感谢。

推荐答案

Firebug的日志标准AJAX请求到控制台面板;这些都是使用ActiveX / XHR发起的请求。

Firebug logs "standard" AJAX requests to the Console panel; these are requests initiated using ActiveX/XHR.

其他类型的请求正在发生,虽然 - 加载CSS,图片,JavaScript等,这些请求记录在Firebug的网络面板。还要注意,请求登录控制台的的出现在网络。

Other types of requests are happening, though - CSS loading, images, javascript, etc. These requests are logged in Firebug's Net panel. Note also that requests logged in Console also appear in Net.

JSONP是AJAX,其中一个℃的跨域方法;脚本> 标记添加到页面。当请求完成后,脚本标记加载内容被解析为JSON。这部作品的原因是,你是欺骗您的浏览器到处理该请求作为一个javascript资源,而不是一个AJAX请求的请求,从而避开跨浏览器的安全限制。

JSONP is a cross-domain method of AJAX in which a <script> tag is added to the page. When the request completes, the loaded contents of the script tag are parsed as JSON. The reason this works is that you are "tricking" your browser into treating the request as a request for a javascript resource rather than an AJAX request, thus skirting cross-browser security restrictions.

把这个一起,JSONP请求(以及所有其他类型的请求,上市这里以及因为所有的&LT; IFRAME&GT; 请求)被记录在网络面板上,而不是在控制台面板。这是不是一个错误或问题;了解JSONP工作的方式是合乎逻辑的要求只会出现在网络。

Putting this all together, JSONP requests (as well as all other types of requests, listed here as well as all <iframe> requests) are logged on the Net panel rather than in the Console panel. This isn't a bug or a problem; understanding the way JSONP works it is logical that the request would only appear in Net.

这篇关于隐藏/看不见的Ajax请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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