Two Forms of Pre-Rendering

May 24, 2023

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.

  • Static Generation is the pre-rendering method that generates the HTML at build time. THe pre-rendered HTML is then reused on each request.
  • Server-Side Rendering is the pre-rendering method that generates the HTML on each request.

Importantly, Next.js lets you choose which pre-rendering form to use for each page. You can create a "Hybrid" Next.js app by using Static Generation for most pages and using Server-side Rendering for others.

Back to home