Chrome may fully prerender the page it predicts a user will choose from the address bar, running its JavaScript before the user presses Enter. That behavior caused intermittent onboarding errors at Synthesia. The app uses query parameters from a signup URL to select an onboarding path, so it saves those parameters to localStorage on the first page load and keeps that snapshot until signup is complete. In affected cases, Chrome had silently prerendered a previously visited Synthesia page while a colleague was typing. That page stored its own parameters first; later, the intended signup page found an existing snapshot and preserved the wrong values, sending the user through the wrong journey. Incognito did not prevent this: its storage begins empty, but is shared across tabs, including invisible prerendered pages, and its suggestions can draw on regular browsing history.
The bug was unusually difficult to reproduce because opening DevTools disables this kind of omnibox prerendering, while a fresh profile has no history to trigger it; typing or pasting the complete URL also avoids the issue. Chrome prerenders suggestions only when its prediction system considers them likely, making frequent users especially susceptible. The fix was to check the browser’s document.prerendering property before saving the query-string snapshot, then wait for the prerenderingchange event so the save happens only if the user actually navigates to the page. The broader lesson is that page loading does not necessarily mean a visit: code that records views, logs events, or changes persistent state should account for prerendering. Servers can identify prerender requests through the Sec-Purpose request header.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.