Skip to main content
The page navigation methods for going to a URL, reloading, going back, and going forward return the final main-document response when navigation performs a network request. Redirects return the final response in the chain. The nullable result is not an error. Navigations to URLs such as data: and about:, same-document navigations, and history operations with no matching entry can complete without a network response.
Stagehand retrieves response bodies and complete metadata lazily. Use the response while its Stagehand session is open. Response handles become invalid when the session closes, and the runtime may collect older handles after enough newer responses arrive.
The navigation signatures are:
Navigation now returns Response | null, rather than returning the Page. The page’s internal reference and page.url() are still updated before the method resolves. If you do not need the response, continue to ignore the return value:

Immediate metadata

These methods read metadata included with the navigation result and do not make another RPC call:
ok() is true for status codes from 200 through 299. headers() returns normalized headers with lowercase names and returns a new object on every call.

Headers and connection metadata

Header lookup is case-insensitive. headerValue() joins duplicate values with , , while headerValues() keeps them separate. headersArray() preserves order, casing, and duplicates. allHeaders() includes extra-info headers, such as set-cookie, when Chrome provides them.

Body and completion

Body access is lazy. Each SDK call requests the body through the response handle; Stagehand reuses the underlying browser body retrieval. json() preserves JSON parse errors. finished() resolves to null after success or an Error describing the loading failure.