SSG SSR

SSG SSR

SSG

The data is fetched at build time, and the same HTML file is served to every user.

Characteristics

  • Fetches data at build time.
  • Generates static HTML pages that can be cached by CDNs.
  • No real-time updates (unless revalidated with incremental static regeneration).
  • Faster response times since the HTML is pre-generated.
  • Ideal for pages that do not require real-time data.


SSR

  • SSR is used to fetch data on each request.
  • Whenever a user requests a page, the data is fetched in real-time
  • The page is rendered on the server before being sent to the user.

Characteristics

  • Fetches data at request time, for each request.
  • Always serves fresh, up-to-date data.
  • Slower response times compared to SSG, as the page is rendered on every request.
  • Ideal for pages that require real-time or user-specific data.







To view or add a comment, sign in

More articles by GeoJung Im

  • Understanding Virtual DOM and React Fiber

    Background of Virtual DOM Changes in DOM Color changes trigger painting (relatively fast). Changes in visibility or…

  • Layered Design - Functional Programming

    Layered Design in Software: Simplifying Code Complexity Layered design in software is a technique where software is…

  • Scope Chain & Call Stack

    Scope Chain The Scope Chain in JavaScript is a list-like structure that stores references to the global object and the…

  • Referencing Values with Refs

    This is the summarization of reading react docs. 1.

  • Getting into Functional Programming

    This is the summarization of reading a grokking functional programming book. Functional Programming Effects…

  • 🚀 Understanding TypeScript and JavaScript Relationship

    This is the summarization of reading Effective Typescript book. Summary TypeScript is a Superset of JavaScript: This…

  • Performance in Frontend

    What Does Performance Mean in Frontend Development? In frontend development, performance refers to how quickly and…

    2 Comments
  • Passing Data Deeply with Context

    This is what I summarized from react docs. Context lets the parent component make some information available to any…

  • Server Component and Client Component

    Advantages of Server Components Data Fetching: It's fast to fetch data from the server because it is physically closer…

    1 Comment
  • What is Closure

    Let's get to know about closure. Closure is used to considered hard to understand.

Insights from the community

Others also viewed

Explore topics