next.js
a362fd27 - instant(): fix cookie handling for fresh page loads (#90613)

Commit
10 days ago
instant(): fix cookie handling for fresh page loads (#90613) Previously, instant() used page.evaluate() to set the cookie via document.cookie, which required a page to already be loaded. This meant the cookie wasn't present on the very first navigation. Switch to Playwright's browser context cookie API so the cookie is set before any page loads. If the page is already loaded, the base URL is inferred automatically. Otherwise, a new baseURL option allows setting the cookie before the first navigation.
Author
Parents
Loading