OrderNot attempted
First visit to a prerendered page
Order what happens on a first visit to a prerendered (SSG) React page, from request to interactive.
Drag the rows, or use the arrows, to put them in order from first to last.
- The page is interactive; client-only data (e.g. from localStorage) renders on the next pass
- React hydrates: renders the same tree, adopts the existing DOM and attaches event handlers
- The entry script runs and makes sure the current route's lazy chunks are loaded
- CSS, the entry script and the
modulepreload-linked chunks download in parallel - The browser parses the HTML: the content is visible but nothing is clickable yet
- The browser requests the URL; the CDN edge returns the HTML file (fetching it from the origin on a miss)
Show answer & explanation
Correct order:
- The browser requests the URL; the CDN edge returns the HTML file (fetching it from the origin on a miss)
- The browser parses the HTML: the content is visible but nothing is clickable yet
- CSS, the entry script and the
modulepreload-linked chunks download in parallel - The entry script runs and makes sure the current route's lazy chunks are loaded
- React hydrates: renders the same tree, adopts the existing DOM and attaches event handlers
- The page is interactive; client-only data (e.g. from localStorage) renders on the next pass
Prerendering gives a fast first paint because the HTML already contains the content. Interactivity waits for JavaScript, and hydration must produce the same markup, so browser-only data is applied after it. modulepreload links let the route's chunks download alongside the entry instead of after it.