SSG vs SSR vs SPA

Updated: 2021-11-19

A rendering mode defines the stage at which your page’s user-facing HTML is generated.

  • SSG (Static Site Generation): at build time. The entire site is pre-rendered into HTML, CSS, and JavaScript at build time, which then get served as static assets to the browser. the fastest possible way—your content is ready to go before the visitor even visits the site.
  • SSR (Server-side Rendering): during HTTP request, render pages on server-side and send the rendered HTML to the client.
  • SPA (Single Page Application): during HTTP request, render on client-side(browser); talk to backend for data updates

https://developers.google.com/web/updates/2019/02/rendering-on-the-web