3 ms·
I recently played around with Next 9.5 prerendering. It had about 400 simple pages with artificially slow API responses to get an idea. - you can prerender a d
by gherkinnn 6y ago
I recently played around with Next 9.5 prerendering. It had about 400 simple pages with artificially slow API responses to get an idea.
- you can prerender a decent amount of pages no probs
- you can prerender only a subset and then have Next render the necessary pages on the server upon request
- as the page is being prerendered, you can send placeholder content, so ttfb is low
- linking to a non-prerendered page within Next will prefetch (and thus prerender) said page as soon as the link is in the viewport (can be disabled)
- in Vercel you can set the branch name as an env variable. I set it to prerender almost nothing during build time if the branch name contained “hotfix”
So far I think it is worth serious consideration. Will it work for you? I dunno. But it’s a breeze to set up, quick to learn, and run some experiments of your own.