Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to filter multiple domains in Firefox DevTools' Network panel?

I am debugging an API request in Firefox and I am looking to filter multiple domains in the developer tools' Network panel. I can filter by one domain with the domain:domainname.com, but how do I add additional domains?

like image 339
the_big_blackbox Avatar asked Nov 13 '19 18:11

the_big_blackbox


People also ask

How do I open Network debugger in Firefox?

There are three ways to open the debugger: Select the Debugger panel in the Web Developer Tools, accessible from the Browser Tools submenu. Press Ctrl + Shift + Z on Windows and Linux, or Cmd + Opt + Z on macOS (starting in Firefox 71; prior to Firefox 66, the letter in this shortcut was S ). Press the menu button.

What is Network in inspect element?

The Network view allows you to see and analyze the network requests that make up each individual page load within a single user's session. You can use this view to investigate the causes of slow pages and identify performance bugs.


2 Answers

Filtering by two domains is not directly possible because the filters in the Network panel is always accumulative, though one workaround is to use a regular expression filter.

This allows you to provide several domains separating them by pipes like this:

regexp:domain1.com|domain2.com

That should work in most cases, but note that this is not just filtering by domain but searching within all the data inside the requests. That means that when the domain name appears in one of the other columns, the request will also be listed.

Another way to achieve this is to use negative filtering by prepending the filter expression with a minus.

So in order to get the requests of two domains you have to write several -domain: expressions for all domains you want to exclude.

like image 107
Sebastian Zartner Avatar answered Sep 24 '22 19:09

Sebastian Zartner


There's also the regexp keyword to use Regular Expressions for URL filtering.

https://developer.mozilla.org/en-US/docs/Tools/Network_Monitor/request_list#Filtering_by_properties

like image 31
mortalis Avatar answered Sep 25 '22 19:09

mortalis