-
Notifications
You must be signed in to change notification settings - Fork 27.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hard Navigation On Client side Navigation (using Link component) in Nextjs 15 #72383
Comments
@NorouziM Thanks for bringing this up. I tested this on my Mac with Next.js v15 and noticed the same issue you mentioned—internal links were causing a full page reload. After checking the file structure, I realized the page.tsx:
In Next.js, a full page reload (hard navigation) can happen in these cases:
|
@james-han I’ve also included a screenshot of the simple link we’re using and a video to demonstrate the issue more clearly on the main post of this issue |
@timneutkens @leerob Any idea for this problem? |
This comment has been minimized.
This comment has been minimized.
@NorouziM You have issues because with Next.js 15 cache behavior was updated and now pages are not longer cached by default see Next.js release notes - https://nextjs.org/blog/next-15#caching-semantics. So because it's not cached it requests the page each time you navigate even on the client. New configuration was added called My question is will it be ever possible to leave dynamic behavior for some pages and have staleTimes on per page basis, because rn I feels a bit radical to have either cache for all pages or no page cache at all. |
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/musing-lalande-js9nmq?file=%2Fapp%2Fpage.tsx%3A5%2C1
To Reproduce
In Next.js v14, this behavior wouldn’t occur. Navigations were handled as soft navigations, resulting in the document not being downloaded on every navigation and requested only once.
Current vs. Expected behavior
In Next.js v15, clicking on internal links leads to full page reloads (hard navigations), resulting in the entire page document being downloaded each time. This behavior differs from Next.js v14, where navigations were handled as soft navigations (client-side transitions), allowing for faster and more efficient page changes without reloading the entire document.
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 start (local), Other (Deployed)
Additional context
next15-issue.mp4
The text was updated successfully, but these errors were encountered: