Streaming fully static pages #79026
Replies: 3 comments 1 reply
-
You try with Client-Side Progressive Loading Example:
|
Beta Was this translation helpful? Give feedback.
-
I just realized that nextjs server does indeed stream in the HTML - it doesn't show the suspense but it does at least stream things via raw HTTP using the Transfer-Encoding: chunked header |
Beta Was this translation helpful? Give feedback.
-
This issue still seems to happen on soft navigations because the RSC payload isn't allowing for incremental rendering referencing a proper issue here with reproduction: #79033 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In a Next.js App Router app with fully static pages, some of my pages are large (like 1MB blog posts with lots of content). Even though soft navigation uses the RSC streamable payload, nothing renders until the full payload downloads.
Why isn’t the page shown incrementally as it downloads? I would expect the top part to render first, with the rest progressively revealed as the payload streams in.
The app uses Suspense with loading states, so in theory the system should be able to show the defined suspense boundaries while the rest of the JSX/HTML downloads. I suspect the issue is that the Suspense states are not included at all in the RSC payload when the page is fully static. But including them would make a big difference: it would allow the shell and early parts of the content to appear quickly, even on very long pages.
Is there a way to achieve this incremental rendering behavior for large static pages?
Related to: #50215
Beta Was this translation helpful? Give feedback.
All reactions