Tips & Tricks #29
Can I block all network request matching a URL pattern?
Chrome, Edge, Opera
Open Command Menu (
Ctrl+Shift+P) > Run "Show Network request blocking". This will open the Network request blocking drawer.
Click the "+" button and add the URL pattern > Add. Reload the page for the changes to take effect. Filter on Blocked Requests by enabling the checkbox in the toolbar.
In the Network panel, click the Request Blocking icon in the toolbar, to open the Blocking pane in the left sidebar.
Input the URL pattern and press
Enter. Reload the page to see the changes take effect.
In the Sources panel, Add a new Local Override by clicking the "+" (Create Resource) button.
Select the Type as "Block", and enter the regex for the URL pattern to override the network request for. Reload the page to see the changes take effect.