Listen for a page’s request event and call request.resourceType() on the supplied request. This passively reports the resource category Puppeteer’s rendering engine assigns; you do not need to enable request interception just to inspect it.
Read a request’s resource type
Register a listener on the page. Each callback receives an HTTPRequest; call resourceType() to get its category and url() to identify the request.
As an Amazon Associate I earn from qualifying purchases.
page.on('request', request => {
console.log(request.resourceType(), request.url());
});
For example, to log only image requests:
page.on('request', request => {
if (request.resourceType() === 'image') {
console.log(request.url());
}
});
Puppeteer’s method reference describes the result as the request’s resource type “as it was perceived by the rendering engine.” It is not a classification based only on a URL suffix: a URL ending in .png is not, by itself, the same thing as Puppeteer reporting image.
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 →What values can resourceType() return?
The Puppeteer ResourceType is the lowercase form of the DevTools Protocol’s Network.ResourceType. A practical list of values documented in a historical Puppeteer issue is:
#1 Best Overall
documentstylesheetimagemediafontscripttexttrackxhrfetcheventsourcewebsocketmanifestother
Treat that enumeration as a practical guide, not a promise that every Puppeteer and browser combination returns precisely the same set. Confirm behavior against the version installed in your project. The surfaced API pages carry different version labels—25.4.0 for the method, 25.10.0 for the type alias, and 25.12.0 for request and interception references—so they should not be read as one synchronized release snapshot.
Observe requests without interception
Use the page’s request event when you only need to classify or log traffic. Passive observation does not require page.setRequestInterception(true). Keeping interception off avoids adding request-handling responsibilities to a task that only reads metadata.
Rank #2
Intercept only when you need to change a request
To block, rewrite, or otherwise control requests, enable interception and resolve each intercepted request. For example, this blocks images and continues other requests:
await page.setRequestInterception(true);
page.on('request', request => {
if (request.resourceType() === 'image') {
void request.abort();
} else {
void request.continue();
}
});
Once interception is enabled, requests stall until they are continued, responded to, aborted, or completed from browser cache. In more complex handlers, make sure each intercepted request is resolved once and handle asynchronous errors. The interception reference explains the method’s behavior and shows interception examples.
Do not confuse resource type with navigation or failure status
- Resource category:
resourceType()reports the category the rendering engine assigns, such asscriptorimage. - Navigation:
isNavigationRequest()answers whether the request drives the current frame’s navigation; it is a separate question from the resource category. - Failure:
requestfailedindicates a failed request lifecycle. An HTTP response with status 404 or 503 is still an HTTP response and normally completes throughrequestfinished, rather than being treated as a request failure. - URL suffix: checking a filename extension is a different filtering strategy and does not tell you what category the rendering engine assigned.
Or skip the browser setup
If your goal is to get a website screenshot rather than inspect Puppeteer request events, ScreenshotNeo provides a screenshot API and MCP server. Its one-call API example is:
Quick Recap
Best Value
- Used Book in Good Condition
Rank #4
curl -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 API options. Cookie banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. Its MCP server lets AI agents take screenshots, and the Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo free.
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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →




