21

Within Firefox, I would like to see all network requests being made by Firefox.

Using Firefox developer tools works great for this. Just open the developer tools, click on Network, and there you go.

The problem happens when a site opens a link in a new tab. Because Firefox's developer tools seem to be attached to an individual tab, it only shows network requests for the original tab.

How do you view a log of network requests across tabs in Firefox?


EDIT: I thought that by opening devtools in their own window would allow this to work, but the network requests log still seems to be tied to the tab that originally opened devtools.

  • @dsstorefile1 Thanks. Do you know if it's the same logger as in uBO? The uBO logger is okay, but it doesn't show network requests made by other extensions or by the browser itself. I'm not sure if it even shows ones made by websockets. – RockPaperLz- Mask it or Casket Mar 07 '19 at 04:15

3 Answers3

20

Disable new tabs

Navigate to about:config

browser.link.open_newwindow                      1
browser.link.open_newwindow.restriction          0
browser.link.open_newwindow.override.external    3

This way, whatever link you click that would ordinarily open a new tab will not, so you can see what it does in the network inspector. Then change these settings back to their defaults after.

Reference: https://support.mozilla.org/en-US/questions/1190923

kloddant
  • 745
  • 1
  • 6
  • 10
  • 2
    There is a 4-year old bug to fix this issue as well https://bugzilla.mozilla.org/show_bug.cgi?id=1219917 – Justin Bailey Feb 19 '20 at 17:59
  • 4
    This bug is perhaps more relevant: https://bugzilla.mozilla.org/show_bug.cgi?id=1569859 – Thayne Mar 19 '20 at 23:35
  • 1
    This also prevents the window from being closed by a script in the popup, since the script is no longer the window creator. – mvreijn Sep 17 '20 at 19:48
7

Open the Browser Console:

  1. from the menu: select "Browser Console" from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS).
  2. from the keyboard: press Ctrl+Shift+J (or Cmd+Shift+J on a Mac).

In the top right select Requests:

Waterfox Browser Console

(I use Waterfox so the app icon is different, and I'm using the Dark theme, but otherwise it looks the same in Firefox.)

Yay295
  • 204
  • 2
  • 7
  • 1
    This is a great answer. Thank you so very much. This works because the Browser Console is independent of the browser's tabs. The UX is a little confusing because this is not quite the same as the "Console" tab that is present in the multi-function Firefox devtools UI. – RockPaperLz- Mask it or Casket Jul 23 '21 at 18:54
  • Unfortunately with this solution, we cannot right click on the request to copy as cURL to replay / edit the request. The other answer using about:config can do it. – baptx Dec 11 '21 at 19:49
0

Temporary disable new tabs

Possible solution, depending on your specific problem, may be to enable 'Preserve log' on the 'Network' tab (DevTools > Network > Preserve log) and force all links to open in the same tab by executing the following code in the console:

[].forEach.call(document.querySelectorAll('a'),
    function(link){
        if(link.attributes.target) {
            link.attributes.target.value = '_self';
        }
    });

window.open = function(url) {
    location.href = url;
};
Ilya Panin
  • 11
  • 2