No response in network tab for partial prerendering?
Unanswered
American Chinchilla posted this in #help-forum
American ChinchillaOP
I was playing with partial pre-rendering and noticed a weird thing.
Why there is no extra response in the Network tab for "lazy loaded" components inside
I was expecting that these components would be lazily loaded from the server. If there is no extra entry in the Network tab how this payload is delivered to the window?
Why there is no extra response in the Network tab for "lazy loaded" components inside
<Suspense>I was expecting that these components would be lazily loaded from the server. If there is no extra entry in the Network tab how this payload is delivered to the window?
5 Replies
Broad-snouted Caiman
The content is streamed in the first response
American ChinchillaOP
Is there any way to debug in Chrome to see what exactly is streamed and when?
@American Chinchilla Is there any way to debug in Chrome to see what exactly is streamed and when?
Spectacled bear
Hi, did you get any answer for this yet?
@Spectacled bear Hi, did you get any answer for this yet?
seems like an old thread, but here's whats happening to PPR pages, as far as I know:
the
as the whole page content ("with some holes", represented by the skeleton components) have been sent through the wire, NextJS resolves the components' promises which in turn produces these script tags at the end.
these script tags are calls to the client-side javascript that essentially patches the "holes" with real data, removing the skeletons and have them display the data it wants.
and all of this takes place in a single request duration. it's really cool how browsers are able to display the page even before the request has finished.
the
head and body content are similar to how static files do which loads really quickly. but they leave holes, loading tags which does not hold any real data.as the whole page content ("with some holes", represented by the skeleton components) have been sent through the wire, NextJS resolves the components' promises which in turn produces these script tags at the end.
these script tags are calls to the client-side javascript that essentially patches the "holes" with real data, removing the skeletons and have them display the data it wants.
and all of this takes place in a single request duration. it's really cool how browsers are able to display the page even before the request has finished.
it's a bit difficult to tell, but you can clearly see some of the dynamic content that are displayed in the page is in one of these script tags