Prevent logging of AJAX calls in console tab of Firebug like Twitter

£可爱£侵袭症+ 提交于 2019-12-06 02:52:13

问题


Need to know how i can prevent logging my AJAX calls in Firebug's Console tab, the way Twitter does. When you search in Twitter you get a live update feed saying "5 tweets since you searched". Twitter sends periodic AJAX calls for the live updates, however these AJAX calls do not get logged in Firebug's console tab, you will be able to see them if you switch to the Net tab of Firebug. Can someone tell me how does twitter achieve this because in my web application all the AJAX calls get logged into the Firebug's console tab.

EDIT : http://integratedsearch.twitter.com/search.html?_=1262555274577&q=%23avatar&since_id=7344168531&refresh=true&callback=processSummizeRefresh.

Thats the url that gets fired. Pasting the link in your browser you will even get the resoponse.


回答1:


Note the callback processSummizeRefresh.

Since the call is being made to a subdomain (integratedsearch.twitter.com), JSONP is being used which injects a script tag to make the request.

No special FireBug hiding magic :)

See: FireBug and monitoring JSONP cross-domain requests



来源:https://stackoverflow.com/questions/1996442/prevent-logging-of-ajax-calls-in-console-tab-of-firebug-like-twitter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!