nextjs - ✅(Solved) Fix Prefetch requests happen more than once on Next 16 [1 pull requests, 16 comments, 11 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85489Fetched 2026-04-08 02:15:26
View on GitHub
Comments
16
Participants
11
Timeline
57
Reactions
9
Timeline (top)
subscribed ×26commented ×16mentioned ×5cross-referenced ×3

Fix Action

Fixed

PR fix notes

PR #85678: fix: reduce duplicate prefetch requests for ppr pages

Description (problem / solution / changelog)

PPR prefetch tasks were executing both the RouteTree and Segments phases:

  1. RouteTree phase: Fetched route metadata (1 request)
  2. Segments phase: Fetched individual segments - head metadata, layouts, and page segments (4+ additional requests)

This behavior differed from Next.js 15, where PPR pages only prefetched route tree metadata. Next.js 16 introduced a two-phase system that was causing the duplicate requests. This fix (skipping the Segments phase for auto-prefetch) restores the Next.js 15 behavior.

Modified the prefetch scheduler to skip the Segments phase for PPR tasks

Note: I preserved the unused pingStaticHead, pingSharedPartOfCacheComponentsTree and pingRuntimePrefetches functions for future use.

Fixes: https://github.com/vercel/next.js/issues/85489

Changed files

  • packages/next/src/client/components/segment-cache/scheduler.ts (modified, +17/-61)

Code Example

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:31 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 22.13.1
  npm: 11.1.0
  Yarn: N/A
  pnpm: 10.20.0
Relevant Packages:
  next: 16.0.1 // Latest available version is detected (16.0.1).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/jperezr21/next-16-issue

To Reproduce

  1. pnpm build
  2. pnpm start
  3. Go to /
  4. See logs
<img width="832" height="255" alt="Image" src="https://github.com/user-attachments/assets/eb1ac1bd-afaf-4df0-8519-8e2230ce2ba6" />
  1. git checkout next-15
  2. pnpm build --turbopack
  3. pnpm start
  4. Go to /
  5. See logs
<img width="833" height="192" alt="Image" src="https://github.com/user-attachments/assets/344137cb-0acf-408d-9829-450a7023f8fa" />

Current vs. Expected behavior

Links should be prefetched once, but they're being prefetched more than once

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.6.0: Mon Aug 11 21:16:31 PDT 2025; root:xnu-11417.140.69.701.11~1/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 22.13.1
  npm: 11.1.0
  Yarn: N/A
  pnpm: 10.20.0
Relevant Packages:
  next: 16.0.1 // Latest available version is detected (16.0.1).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Linking and Navigating

Which stage(s) are affected? (Select all that apply)

Vercel (Deployed), next start (local)

Additional context

Identified this issue after upgrading to next 16 and seeing the number of function invocations in Vercel more than double:

<img width="1235" height="547" alt="Image" src="https://github.com/user-attachments/assets/b004e978-9863-45c7-873a-a20a5350b3ef" />

Upgraded on Oct 23, downgraded on Oct 27

extent analysis

TL;DR

Downgrade to Next.js 15 or investigate the prefetching behavior in Next.js 16 to identify the cause of excessive prefetching.

Guidance

  • Investigate the differences in prefetching behavior between Next.js 15 and 16 by comparing the documentation and release notes for both versions.
  • Review the code changes made after upgrading to Next.js 16 to ensure that no unintended changes are causing the excessive prefetching.
  • Check the Vercel configuration to see if there are any settings that could be contributing to the increased function invocations.
  • Test the application with different linking and navigating scenarios to see if the excessive prefetching is consistent across all cases.

Example

No code snippet is provided as the issue is related to the behavior of Next.js 16 and not a specific code block.

Notes

The issue seems to be specific to Next.js 16, and downgrading to version 15 resolves the problem. However, it is essential to investigate the cause of the excessive prefetching to ensure that it is not a symptom of a larger issue.

Recommendation

Apply workaround: Downgrade to Next.js 15 until the cause of the excessive prefetching in Next.js 16 is identified and resolved. This is because downgrading to version 15 has been confirmed to resolve the issue, and it is a safer option until the root cause is determined.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING