What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Call response.frame() on Puppeteer’s HTTPResponse. It returns the Frame that initiated that response, or null for a response associated with navigation to an error page. Check for null before using frame methods.
Get the frame from an HTTPResponse
For a response returned by page.waitForResponse(), call frame() directly on that response:
As an Amazon Associate I earn from qualifying purchases.
const response = await page.waitForResponse(response =>
response.url().includes('/api/data') && response.status() === 200
);
const frame = response.frame();
if (frame === null) {
// Handle a response associated with navigation to an error page.
} else {
console.log('Initiating frame URL:', frame.url());
}
HTTPResponse.frame() identifies the frame that initiated the response. It is not a lookup by URL, and the returned frame may not be the main frame: a request can originate from a subframe.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Wait for the right response
page.waitForResponse() accepts a URL or a predicate and resolves to the matching HTTPResponse. A predicate is useful when the URL alone is not enough to identify the request. Combine relevant properties such as the URL and status so the wait does not resolve for an unrelated response.
#1 Best Overall
If an action triggers the request, start waiting before performing that action. This avoids missing a quick response:
const responsePromise = page.waitForResponse(response =>
response.url().includes('/api/data') && response.status() === 200
);
await page.click('button.load-data');
const response = await responsePromise;
const frame = response.frame();
if (frame !== null) {
console.log(frame.url());
}
In Puppeteer 25.12.0, documented on 2026-10-03, the default wait timeout is 30 seconds. Change the default with page.setDefaultTimeout(), or cancel a wait with an AbortSignal. If a wait times out, check that the action actually triggers a matching response and that the predicate matches its URL and other properties.
Rank #2
Use the response event when it is already available
If your code handles responses through the page’s response event, the same method applies to the event’s response object:
Recommended Free Tools
page.on('response', response => {
const frame = response.frame();
if (frame !== null) {
console.log(response.url(), frame.url());
}
});
The event handler should account for null rather than assuming every response has a usable frame.
Do not confuse a response frame with waiting for a frame
response.frame() answers: “Which frame initiated this response?” page.waitForFrame() solves a different problem: it waits for a frame matching a URL or predicate to appear. Use the latter when the frame itself is what you are waiting for; it is not a substitute for retrieving the initiating frame from a known response.
Account for navigation edge cases
A response’s frame() method can return null for navigation to an error page. Treat that as a distinct outcome and decide how your application should handle it before calling methods such as frame.url().
Rank #4
Also, page.goto() does not always return an HTTPResponse: it returns null for about:blank and same-URL hash navigation. Check the value returned by goto() before calling frame() on it:
Free tools Windows power users keep installed
One-click scans. No signup required.
const response = await page.goto('https://example.com');
if (response === null) {
// No HTTPResponse was returned for this navigation.
} else {
const frame = response.frame();
if (frame !== null) {
console.log(frame.url());
}
}
Or skip the browser setup
If your task is to capture a website image or PDF rather than inspect a Puppeteer Frame object, ScreenshotNeo offers a screenshot API. A single GET request can return a screenshot or PDF; it does not return Puppeteer’s response or frame objects.
Best Value
For example, save a WebP screenshot of a page with cURL:
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. Cookie banners, newsletter popups and chat widgets are removed before capture by default, and those steps can be turned off. Bot checks, blank pages, failed loads, timeouts and cache hits are not billed; response headers identify the page verdict and billing status. An MCP server provides screenshot tools for Claude, Cursor and other MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up free for 1,000 screenshots a month with no card.
Troubleshooting
frame.url()throws an error: Check thatresponse.frame()did not returnnullbefore calling frame methods.- The wait times out: Start
waitForResponse()before the triggering action, verify the action sends a request, and make the predicate specific to the response you expect. The default timeout documented for Puppeteer 25.12.0 is 30 seconds; adjust it withpage.setDefaultTimeout()or use anAbortSignalwhen cancellation is needed. page.goto()did not give you a response: Its result can benullforabout:blankand same-URL hash navigation. Branch on the return value before using response methods.- You need to wait for a newly appearing frame, not identify a response’s source: Use
page.waitForFrame()with an appropriate URL or predicate.
Version note
The API references reviewed document Puppeteer 25.12.0 as of 2026-10-03. If your installed version behaves differently, check the API documentation for that version and confirm which version your project uses.
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.




