Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FireBug and monitoring JSONP cross-domain requests

This question is specific to the Firebug plugin for Firefox. The actual functionality works, but I lost my ability to monitor and debug it in Firebug.

I had a website which used JSON to get data. In Firebug, I was able to monitor the JSON requests. It would show me each one of them, the headers, and the data that was returned.

I needed to change the server to which I submitted my JSON requests. In order to get cross-domain JSON to work, I used JSONP with the callback=? method. I got the functionality to work. However, I cannot monitor and debug my JSONP requests now in Firebug.

For the record, this in in Firefox 3.0.11 and I am using jQuery with the &callback=? param for my JSONP requests.

How do I get the JSONP requests to show up in Firebug?

like image 247
Krystian Cybulski Avatar asked Jul 18 '09 04:07

Krystian Cybulski


1 Answers

I'm not totally familiar with jquery's callback implementation but I assume it's injecting a script tag in the page to make the request. Most of the libraries do.

Thus, the requests should show up on the NET tab in firebug since it's not an XmlHttpRequest but a 'plain' old script tag with a src getting loaded.

like image 153
seth Avatar answered Sep 27 '22 19:09

seth