How to block some requests with the chrome dev tool

Supakon_k
2 min readAug 29, 2022

--

Photo by Philip Swinburn on Unsplash

Sometimes we want to disable some API requests to test some functionality. Here is how to use the chrome dev tool to block API requests.

  1. Open the dev tool by pressing F12 (or right-click -> inspect) and selecting network tabs (if you don’t see a network tab click the three-dot button)

2. 2. refresh the webpage to get network traffic (don’t close the dev tool panel to log network traffic.)

3. right click on the API that you don’t want to get the response again. It will show block request lit check on the selected list

4. refresh the page again and see blocked API will get an error response cause we blocked that API

5. if we want to allow temporary, we can uncheck the blocked list. You can click the delete button to delete the blocked API.

Thank you for reading & enjoy your coding :)

Let’s check out my recommended book: Seriously Good Software: Code that works, survives, and wins 1st Edition

--

--

Supakon_k
Supakon_k

Written by Supakon_k

Software Engineer & Freelancer from Thailand.

No responses yet