Next/Link is prefetching the current page being viewed #70535
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Performance
Anything with regards to Next.js performance.
Link to the code that reproduces this issue
https://github.com/dannytlake/next-prefetch-bug-current-route
To Reproduce
Start in production mode, view network tab.
pnpm build && pnpm start
page2_rsc
- this should not be occurringCurrent vs. Expected behavior
Current: The Next/Link component is prefetching the current page being viewed, unnecessarily consuming network + cpu resources
Expected: The Next/Link component should not prefetch links pointing to the current page being viewed.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:30 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6000 Available memory (MB): 32768 Available CPU cores: 10 Binaries: Node: 20.16.0 npm: 10.8.2 Yarn: 1.22.22 pnpm: 8.15.9 Relevant Packages: next: 15.0.0-canary.171 // Latest available version is detected (15.0.0-canary.171). eslint-config-next: 14.2.7 react: 19.0.0-beta-26f2496093-20240514 react-dom: 19.0.0-beta-26f2496093-20240514 typescript: 5.5.4 Next.js Config:
Which area(s) are affected? (Select all that apply)
Navigation, Performance
Which stage(s) are affected? (Select all that apply)
next start (local), Vercel (Deployed)
Additional context
This bug also occurs in next@14 (v14.2.13 at time of writing)
The text was updated successfully, but these errors were encountered: