Back
Two Forms of Pre-rendering
home  /  experiments  /  nextjs  /  posts  /  pre-rendering

Two Forms of Pre-rendering

Lorem ipsum dolor sit amet consectetur, adipisicing elit. Officia harum laudantium sint rem excepturi opti dolor id quasi, dicta illum eaque amet exercitationem? Maiores natus cupiditate reiciendis harum doloribus suscipit, magnam possimus. Tenetur quos id harum placeat obcaecati ullam corrupti illum officia, nostrum reprehenderit aliquam veniam alias

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.

haritssr.com © 2021–2024 by Harits Syah
Share This Page