Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Call response.fromServiceWorker() on the HTTPResponse object. It returns true if a service worker served that response and false otherwise. In a page response listener, the response event provides the object to check.

Check the response in a page event

Register a listener for the page’s response event and inspect each response with fromServiceWorker():

page.on('response', response => {
  if (response.fromServiceWorker()) {
    console.log('Served by a service worker:', response.url());
  }
});

The event supplies a Puppeteer HTTPResponse. The method is documented in the Puppeteer API; the cited reference displays version 25.4.0. If you need to verify availability or signature for a different installed version, check that version’s API documentation: HTTPResponse.fromServiceWorker().

Understand what the result tells you

fromServiceWorker() answers a provenance question: did a service worker serve this response? It is distinct from whether the browser used its memory or disk cache. Puppeteer documents the two methods separately in the HTTPResponse API.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Use response.fromServiceWorker() to check service-worker provenance.
  • Use response.fromCache() to check whether the response came from browser cache.
  • Do not treat a cache result as proof that a service worker was or was not involved.

Do not confuse a response with an interception decision

When request interception is enabled, Puppeteer stalls requests until your code continues, fulfills, or aborts them. Methods such as isInterceptResolutionHandled() and interceptResolutionState() describe how interception has been resolved; they do not identify the source of the resulting response. Use HTTPResponse.fromServiceWorker() for that check. See the Puppeteer network interception guide.

Responses with HTTP error status codes

A response event can still occur for an HTTP error such as 404 or 503. An unsuccessful status code alone does not make it a request failure event. You can inspect the service-worker flag and the response status separately. The Puppeteer page events documentation describes the response event and this distinction.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

If your goal is to obtain a clean screenshot rather than diagnose Puppeteer response provenance, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP, or PDF. Its cleanup can accept cookie-consent banners and remove known consent platforms, newsletter popups, and chat widgets before capture; those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with response headers indicating the page verdict and billing result. AI agents can use its MCP server tools, including take_screenshot, get_page_info, and capture_pdf.

Example request (replace the URL and API key):

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 API documentation for request options. The Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for free and try ScreenshotNeo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.