Open NorouziM opened 1 week ago
@NorouziM Hi 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 app/x
directory was empty, so navigating to /x
triggered a hard reload as expected. Once I added a page.tsx
file under app/x
, the reload stopped, and the navigation returned to a client-side transition.
page.tsx:
export default function Page() { return <p>X Page</p>; }
In Next.js, a full page reload (hard navigation) can happen in these cases:
page.tsx
**: If the target route folder lacks a page.tsx
file, Next.js won’t recognize it as a fully client-side route.@james-han Hi James-han Thank you for your response. I wanted to clarify that I have already added the page.tsx file; I’ve attached a screenshot to confirm this. Additionally, we’re experiencing this issue on a project that was previously functioning correctly on Next.js v14. The problem only arose after upgrading Next.js to the latest version.
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?
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
https://github.com/user-attachments/assets/5fd95c4d-3f0d-4bd5-9849-4c35575b3872