Recommended Free Tools
For normal Puppeteer request interception, use page.setRequestInterception(true) and handle the resulting request events. Do not build new Puppeteer code around the Chrome DevTools Protocol event Network.requestIntercepted: that protocol event is deprecated, and the protocol documentation points to Fetch.requestPaused instead. The distinction matters because Puppeteer’s supported, higher-level workflow is not the same thing as subscribing directly to a CDP event.
The examples below use Puppeteer’s public Page API. They show how to let requests proceed, block or replace them, coordinate multiple handlers, and diagnose requests that stall or are resolved twice.
Use Puppeteer’s Page API for ordinary interception
Request interception lets your Puppeteer code decide what happens to a browser request before it proceeds. Enable interception before navigation, register a page.on('request') listener, and resolve each intercepted request with one action: continue it, abort it, or provide a response. Puppeteer’s current guide describes this workflow in its Request Interception guide; the API reference documents Page.setRequestInterception().
Runnable example: block image files and allow everything else
Install Puppeteer in a Node.js project with npm install puppeteer, then save this as an ES module such as intercept.mjs and run node intercept.mjs. Puppeteer’s package setup and installed browser determine the runtime; this example does not rely on a particular site’s markup.
#1 Best Overall
import puppeteer from 'puppeteer';
const browser = await puppeteer.launch();
try {
const page = await browser.newPage();
await page.setRequestInterception(true);
page.on('request', request => {
if (request.isInterceptResolutionHandled()) return;
if (request.url().endsWith('.png') || request.url().endsWith('.jpg')) {
request.abort();
} else {
request.continue();
}
});
await page.goto('https://example.com');
} finally {
await browser.close();
}
The initial handled-state check is useful if another listener or package might resolve the same request. The handler otherwise makes a decision for every request: matching URLs are aborted and all other requests continue. Adjusting a suffix test may be necessary for URLs with query strings, uppercase extensions, or other image formats; the example intentionally demonstrates the interception mechanism rather than a complete image classifier.
What happens after interception is enabled
Once interception is on, requests pause unless code resolves them or the browser serves them from cache. The practical rule is simple: a request your listener does not need to modify still needs an explicit request.continue(). Puppeteer’s guide warns that omitting continuation can leave a request hanging.
- Create or obtain a
Page. - Call and await
page.setRequestInterception(true)before navigation or before triggering the activity whose requests you want to handle. - Register a
page.on('request', ...)listener. - For each request, choose
request.continue(),request.abort(), orrequest.respond(). - Only then navigate or trigger the page action.
Enabling interception after a navigation has already begun will not retroactively give your handler control over requests that have already happened. For predictable behavior, set it up first.
Let a request proceed
Call request.continue() when you do not need to change or cancel the request. In a handler that covers all traffic, this is the default path, not an optional cleanup step.
Cancel a request
Call request.abort() when your code deliberately wants the browser request to fail, for example to prevent selected resources from loading. A page may behave differently when a script, stylesheet, image, or API call is missing, so restrict conditions to the specific requests you intend to block.
Supply a synthetic response
Call request.respond() when your code should provide a response instead of allowing the original request to proceed. This is useful for controlled substitutions such as returning a small test response. The response must be constructed in the shape supported by the Puppeteer API version in your project; consult the relevant API documentation before relying on particular response fields.
Rank #2
Prevent duplicate resolution errors
A request must not be resolved twice. If one listener calls continue() and another later calls abort() or respond(), Puppeteer can raise an error such as “Request is already handled!”. Check request.isInterceptResolutionHandled() immediately before acting. The check is especially important when several listeners or a dependency may participate in interception.
Keep the final check beside the action
Asynchronous work creates a window in which another handler can resolve the request. Do not check the state, await a result, then assume it is unchanged. Recheck after the await, and make the check and resolution call together synchronously:
page.on('request', async request => {
if (request.isInterceptResolutionHandled()) return;
const shouldBlock = await decideWhetherToBlock(request.url());
// Another listener may have resolved it while decideWhetherToBlock ran.
if (request.isInterceptResolutionHandled()) return;
if (shouldBlock) {
request.abort();
} else {
request.continue();
}
});
Here decideWhetherToBlock represents application code you supply; it is not a Puppeteer function. Avoid adding another await between the final state check and the resolution call, because that would reopen the race the check is intended to prevent.
Coordinate multiple interception handlers
Puppeteer supports Legacy Mode and Cooperative Intercept Mode for resolution coordination. In default Legacy Mode, an unprioritized resolution takes effect immediately. When several handlers may compete, that can make order and ownership important: a handler should test whether the request is already handled before attempting its own action.
Cooperative Intercept Mode applies only when all resolutions provide numeric priorities. With numeric priorities, the highest priority wins; if priorities tie, abort ranks above respond, which ranks above continue. The guide recommends priority 0 or DEFAULT_INTERCEPT_RESOLUTION_PRIORITY for a default, unopinionated continuation. See Puppeteer’s interception guide for the current coordination details and API syntax.
- Do not assume cooperative behavior if even one participating resolution omits a numeric priority.
- Use a priority deliberately when multiple handlers are expected to express competing preferences.
- Keep the handled-state guard: priorities do not make an unsafe second resolution call safe.
Why `Network.requestIntercepted` is not the normal Puppeteer event
Network.requestIntercepted is a CDP protocol event name, not the event name used by Puppeteer’s ordinary Page interception API. The protocol snapshot marks it deprecated and directs consumers to Fetch.requestPaused. That is a protocol-level migration note, not a reason to replace Puppeteer’s documented page.on('request') workflow with raw protocol handling.
Free tools Windows power users keep installed
One-click scans. No signup required.
For routine Puppeteer automation, use page.setRequestInterception(true) and the request object methods shown above. Consider a direct CDP session only when your task specifically requires direct protocol control. The available protocol reference establishes the deprecation and the suggested replacement, but does not establish a need to use Network.requestIntercepted directly for ordinary Puppeteer interception.
The protocol snapshot documenting the deprecated event is in the Chromium DevTools Frontend project’s browser_protocol.json. Puppeteer’s public Page API reference is the more relevant starting point for application code.
Troubleshoot stalled or unexpectedly handled requests
The page appears to hang after interception is enabled
Likely cause: At least one request is not being resolved. A listener that only handles selected URLs still needs to continue requests outside its special case.
Fix: Make the handler’s branches exhaustive: block, respond, or continue. Confirm interception was configured before navigation, and check that asynchronous branches eventually reach a resolution action.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Puppeteer reports “Request is already handled!”
Likely cause: Another listener, plugin, or code path already resolved the request.
Fix: Check request.isInterceptResolutionHandled() immediately before the action. In asynchronous handlers, check again after awaited work. If multiple handlers are yours, decide which should own a request or use the documented priority approach consistently.
Rank #4
A request is blocked even though this handler did not intend to block it
Likely cause: A URL predicate is broader than expected, or another handler is making a resolution decision. String suffix checks can also miss query-string or case variations, while broad substring tests can match unrelated hosts or paths.
Fix: Parse URLs with the platform URL class and inspect the hostname, pathname, or other specific component relevant to your rule. Log the request URL and decision while debugging, then narrow the predicate. Coordinate with other listeners rather than assuming one listener sees every request first.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →The replacement response does not match the expected page behavior
Likely cause: The synthetic response does not match what the requesting page code expects, or the response object uses fields unsupported by the Puppeteer version installed.
Fix: Verify the expected status, headers, and body for the particular request, and check the API reference corresponding to your installed Puppeteer version. Test the page behavior with the substituted response before using it in a larger automation flow.
Interception seems not to affect a request
Likely cause: The request may have started before interception was enabled, or the browser may serve it from cache. The Puppeteer API notes that a request can proceed from browser cache even while interception is enabled.
Fix: Enable interception before the navigation or action that triggers the request. When diagnosing, distinguish requests that reached the handler from resources served from cache; do not assume every observed resource necessarily follows the same path through the listener.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteBest Value
- Used Book in Good Condition
Performance, reliability, and cost considerations
Interception adds a decision point to requests, and unresolved requests can stall page activity. Keep handlers focused, avoid unnecessary asynchronous work, and continue requests promptly when no special handling is required. The official material cited here does not provide a numeric performance penalty or benchmark, so there is no responsible universal slowdown figure to quote.
Reliability depends primarily on complete resolution logic and safe coordination between handlers. A useful implementation checklist is:
- Interception is enabled before the work being observed.
- Every relevant path resolves with exactly one action.
- Handlers guard against prior resolution, particularly after asynchronous work.
- Any use of priorities follows Cooperative Mode consistently among participating handlers.
- URL matching is narrow enough not to affect unrelated traffic.
Interception itself does not define an external service charge. Runtime and infrastructure costs depend on where and how your browser automation runs; the sources cited here do not establish a general cost figure for those environments.
Or skip the browser setup
If your real goal is a clean website screenshot rather than controlling arbitrary browser requests, ScreenshotNeo offers a one-request screenshot API. It does not replace Puppeteer’s request-interception API; it is an alternative for the screenshot-capture job.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchescurl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for request options. Before capture, it accepts the cookie or consent banner and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and responses include X-Page-Verdict and X-Billed headers. Its MCP server includes take_screenshot, get_page_info, and capture_pdf tools for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Is `Network.requestIntercepted` a Puppeteer event I should listen for?
No. It is a deprecated CDP protocol event. For ordinary Puppeteer interception, use the Page API and its `request` event.
What are the three ways to resolve a Puppeteer request?
Call `request.continue()`, `request.abort()`, or `request.respond()` as appropriate.
Can I use `Network.requestIntercepted` for direct CDP work?
The protocol marks it deprecated and directs users to `Fetch.requestPaused`. Use the newer protocol event only when direct CDP control is specifically required.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

