You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pages router: Use attribute-based head tags reconciler
In React 19, tags within `<head>` may be reordered to improve performance e.g. the viewport is floated earlier into the head.
This breaks the current mechanism of `<Head>` managing its children.
Every child of `Head` used to be prefixed with another `<meta>` tag that indicated that the next sibling would be managed by Next.js.
Since React now reorders tags, that sibling relationship is broken. Client-side reconciliation by the `head-manager` during navigation would be broken resulting in orphaned and dupliated `<meta>` tags.
We no longer prefix `<Head>` managed tags with a `<meta>` tag and instead mark them as owned via `data-next-head`.
The old algorithm was also O(n*m) and ignored reordering so we can do the same thing here.
0 commit comments