This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Browser navigation in between app directory pages are cached and I cannot opt out #70340
Labels
bug
Issue was opened via the bug report template.
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://github.com/priosshrsth/next-cache-test
To Reproduce
/
&/contact
Current vs. Expected behavior
The homepage after browser navigation is not latest and is cached page. No code in
/page.tsx
runs and no fetch requests are made.Expected behavior: Same thing with pages route and
getServerSideProps
shows updated data. And If I putconsole.log
insidegetServerSideProps
, it runs. Also, navigation back from pages route to homepage also returns updated data. This is so bad and so wierd. I don't want to migrate my whole app to pages directory now.Provide environment information
Which area(s) are affected? (Select all that apply)
Navigation
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
I tested on next js 14 and 15. I have used everything like export const dynamic = 'forcedynamic', settint revalidate and everything. Nothing works. meta tag anc cache headers are also set to not cache as well.
The text was updated successfully, but these errors were encountered: