Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 474
Zaje Avatar asked Nov 06 '22 18:11

Zaje


1 Answers

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

like image 104
brianng Avatar answered Nov 12 '22 17:11

brianng