-
Notifications
You must be signed in to change notification settings - Fork 29k
Labels
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/sad-pike-2zgvvw
To Reproduce
- Start the application in development (next dev)
- Go to the home page.
- Inspect the page in devtools.
- Note that the
head
for theiframe
contains<meta name="description" content="Home metadata">
, as declared in theHome
component. - Click the link.
- Inspect the page in devtools.
- Note that the
head
for theiframe
still contains<meta name="description" content="Home metadata">
, even though theDestination
component declares it with different content (and the samekey
). - Reload the
iframe
. - Inspect the page in devtools.
- Note that the
head
for theiframe
contains<meta name="description" content="Destination metadata">
, as declared in theDestination
component.
Current vs. Expected behavior
The meta
tag should have the content
declared in the current page component.
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Sun Aug 6 20:05:33 UTC 2023
Available memory (MB): 4102
Available CPU cores: 2
Binaries:
Node: 20.9.0
npm: 9.8.1
Yarn: 1.22.19
pnpm: 8.10.2
Relevant Packages:
next: 15.4.2-canary.0 // Latest available version is detected (15.4.2-canary.0).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.1.3
Next.js Config:
output: N/A
Done in 2.06s.
Which area(s) are affected? (Select all that apply)
Metadata
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
Also observed on Next 15.4.1.
I can't find documentation that says meta
tags should be updated on navigation, but it worked under Next 15.2.3. The docs say that the "contents of head
get cleared upon unmounting the component," but that doesn't seem to be happening.