Next 16 vs. 15 and caching the document in local dev environment #93390
-
SummaryI've noticed that on next version 16, there are scenarios where the document itself gets returned from cache, whereas this doesn't seem to happen on next version 15. Trying to understand if this is normal/intended as I'm not too familiar with how this stuff works, would love to learn what is happening.This only seems to happen in local dev i.e. when I run To trigger a disk cache for the document on version 16 here's what I've been doing
Result: the document is cached in disk and the dev tool is constantly spinning as a result. Version 16
Next dev tool constantly spinning as a result: Version 15 (could not reproduce)
Additional informationNo response ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
|
@williamj20 did you update the Next.js version included in that dashboard app? I can't repro though with your described steps exactly, but I do know we fixed a bug that somewhat fits your description: What people would observe is that, navigating to a starting page would work, but then a hard navigation to another page, would suddenly not execute JavaScript. Try with |
Beta Was this translation helpful? Give feedback.
-
|
What you're seeing sounds related to the newer Cache Components / router cache behavior introduced in Next 16 rather than the page itself being "accidentally cached". One thing I'd check is whether the behavior still reproduces with Also, if the route depends on search params, make sure those boundaries are isolated correctly. I've seen a few cases where query-string navigation behaves differently once PPR and cache-aware rendering enter the picture. The interesting part here is that you're seeing a difference between 15 and 16 in I've been collecting notes on Next.js 16 cache architecture, Cache Components, PPR behavior, search param boundaries, and debugging weird cache-related issues here: https://www.skills.sh/mohamed-hossam1/nextjs-cache-architecture/nextjs-cache-architecture Repo: Would be interested to hear if disabling Cache Components changes the behavior. And if the repo helps, a ⭐ is always appreciated. |
Beta Was this translation helpful? Give feedback.



@williamj20 did you update the Next.js version included in that dashboard app? I can't repro though with your described steps exactly, but I do know we fixed a bug that somewhat fits your description:
What people would observe is that, navigating to a starting page would work, but then a hard navigation to another page, would suddenly not execute JavaScript.
Try with
next@canary- we haven't released #92892 to stable just yet.