the_big_blackbox
the_big_blackbox

Reputation: 1196

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?

Upvotes: 18

Views: 8591

Answers (3)

Sebastian Zartner
Sebastian Zartner

Reputation: 20125

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 property 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.

Upvotes: 29

redwards510
redwards510

Reputation: 1922

If you want to filter out domains that are cluttering up your requests pane, you simply use the - prefix and separate them with spaces.

-domain:domain.com -domain:domain2.com

The important thing here is that in Firefox you cannot use wildcards like you can in Chrome. So this won't work.

-domain:email.*.com

This is what kept tripping me up. Also, for awhile I thought you separated them with commas. Nope, use spaces.

Upvotes: 6

mortalis
mortalis

Reputation: 2151

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

Upvotes: 5

Related Questions