next-edu

A proof of concept using a NextJS seed ready to be deployed with Vercel.

Go back

Server Side Rendering


This content is: server side rendered.

Pre-rendering

By default, Next.js pre-renders every page. This means that Next.js generates HTML for each page in advance, instead of having it all done by client-side JavaScript.

Pre-rendering can result in better performance and SEO.

Each generated HTML is associated with minimal JavaScript code necessary for that page. When a page is loaded by the browser, its JavaScript code runs and makes the page fully interactive. This process is called hydration.

Next.js has two forms of pre-rendering: Static Generation and Server-side Rendering. The difference is in when it generates the HTML for a page.

Read more about this topic:


What happens when I use Server-side Rendering

Next.js pre-renders a page on each request. It will be slower because the page cannot be cached by a CDN, but the pre-rendered page will always be up-to-date.

The HTML is generated on each request. Therefore, by adding latency to the request Server-side Rendering results in slower performance than Static Generation.