Fix scroll to top after a redirect during client navigation
When a proxy redirected a client-side navigation to a route that optimistic routing did not predict, the retry that corrects the URL used FreshnessPolicy.HistoryTraversal. That policy never assigns a ScrollRef to new segments and reads the BFCache regardless of staleness, so the destination kept the previous scroll position and could render stale content.
Use FreshnessPolicy.Default for the redirect retry, like a seeded redirect from a Server Action: the received data is still reused instead of re-fetched, and new segments scroll into view.
Fixes #98172
Co-Authored-By:
Marcos Hernanz <96699542+marcoshernanz@users.noreply.github.com>
Showing
Please
register
or
sign in
to comment