Call response.fromServiceWorker() on Puppeteer’s HTTPResponse. It returns true when the response was served by a service worker. In a page-level response handler, the event supplies the response object to inspect.
Check service-worker provenance in the response event
Register a response listener and call fromServiceWorker() on each response:
As an Amazon Associate I earn from qualifying purchases.
page.on('response', response => {
if (response.fromServiceWorker()) {
console.log('Served by a service worker:', response.url());
}
});
The event callback receives an HTTPResponse. The method is documented in Puppeteer’s HTTPResponse.fromServiceWorker() API reference; the version shown there is 25.4.0. If your project uses another Puppeteer version, check that version’s API documentation.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Check one response directly
If you already have an HTTPResponse, use the same method without registering a listener:
#1 Best Overall
const servedByServiceWorker = response.fromServiceWorker();
console.log(servedByServiceWorker);
The result is a boolean. It answers whether that response came from a service worker; it does not identify which worker handled it.
Do not confuse service workers with browser cache or interception
Puppeteer exposes separate methods and state for these different questions. fromServiceWorker() checks service-worker provenance; fromCache() checks whether the response came from the browser’s disk or memory cache. A cache result alone does not establish whether a service worker served the response. See the HTTPResponse API for the distinction.
| What you want to know | What to inspect |
|---|---|
| Was this response served by a service worker? | response.fromServiceWorker() |
| Did this response come from browser cache? | response.fromCache() |
| Has Puppeteer’s intercepted request been resolved, and how? | isInterceptResolutionHandled() or interceptResolutionState() |
Request interception is a separate mechanism. When enabled, Puppeteer stalls intercepted requests until your code continues, fulfills, or aborts them. Interception-resolution methods describe that process; they are not substitutes for the response’s service-worker provenance check. See Puppeteer’s request interception guide.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Handle HTTP errors as responses, not automatically as request failures
A response with an HTTP status such as 404 or 503 still arrives through the response event. Its status code alone does not make it a request failure. You can inspect the status and service-worker provenance on the same response:
Rank #3
page.on('response', response => {
console.log({
url: response.url(),
status: response.status(),
servedByServiceWorker: response.fromServiceWorker(),
});
});
Puppeteer documents the response event payload and HTTP error-response behavior in its Page events reference. Keep response handling distinct from request-failure handling: an HTTP error status is still a received response.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API, not a Puppeteer diagnostic tool: it does not report whether a response came from a service worker. If your goal is to get a page screenshot rather than inspect response provenance, a single request can return an image:
Quick Recap
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 request options. It removes cookie/consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, failed loads, timeouts, and cache hits are not billed. It also provides an MCP server for AI agents. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for the free plan.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.




