Engineering Analysis · Global
Keep open tabs working through a Next.js rollout
A rolling deploy can break a tab that was working five minutes earlier. Test both builds together before shifting traffic.
By Launchr Space ·
Keep a tab open on version A, release B, and submit a draft without refreshing. This is the deployment test most teams skip. When two builds serve traffic together, an old browser tab can ask a new server for a route payload, a Server Action, or a chunk with an identity that no longer matches. A healthy homepage on the new build tells you little about this failure.
Next.js documents deploymentId as a version identifier for rolling releases. It attaches the identifier to client navigation requests, and a version mismatch can fall back to a full navigation. The deployment query parameter on static assets helps with caching; Next.js does not use that parameter to route an incoming request to an older instance. If you want both versions to keep serving their own clients, your host or CDN needs to support that routing.
Run a real two-build test
Use a distinct deployment ID for each release and the same value for replicas of that release. Keep both builds available in staging. Open a tab on A and then send its next request to B. Test a client navigation, a form submission and a lazy-loaded chunk independently. Watch the browser network panel and application logs. A deliberate reload that preserves the user’s draft is very different from a lost submission or a blank page.
Give users a predictable way back
Record the release identifier alongside navigation failures, chunk errors and application responses that indicate stale actions. Compare error counts around the traffic shift with the prior baseline. If you cannot route requests by deployment, save recoverable form state before any forced reload where the workflow permits it. Test recovery on a real slow connection and keep rollback and old asset retention configured long enough for the handover. Avoid storing sensitive draft fields in browser storage just to survive a refresh.
Set the release gate
Decide which routes may reload and which must keep enough state to finish. Add the open-tab test to your release checklist, including the version rollback. If a user can lose work, hold the rollout until you have either version-aware routing or an explicit recovery path. Treat version skew as part of deployment design, not a reason to ask users to clear their cache.