Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Incremental Static Regeneration: Static sites on steroids

Incremental Static Regeneration: Static sites on steroids

Static sites are great. They are fast, cheap, secure, and easy to maintain. But generating static assets is a process that takes more and more time while our site gets bigger. We will talk about ISR, a feature that Next.js framework offers us to generate static pages at runtime.

Facundo Giuliani

May 21, 2021
Tweet

More Decks by Facundo Giuliani

Other Decks in Programming

Transcript

  1. HELLO! Facundo Giuliani Systems Engineer Full Stack Developer Auth0 Ambassador

    Cloudinary MDE GitKraken Ambassador Web fgiuliani.com Twitter @facundozurdo GitHub @fgiuliani
  2. “ A web page where some of the content is

    generated dynamically, when needed
  3. STATIC WEB PAGE ⊡ Fast ⊡ Cheap ⊡ Easy to

    maintain ⊡ Secure ⊡ Easy to scale ⊡ Stable
  4. “ Compiling and rendering a web app at build time,

    generating static assets like HTML, JavaScript and CSS files
  5. NEXT.js ⊡ Page based (with dynamic routes) ⊡ Static site

    generation ⊡ Server-side rendering ⊡ Client-side rendering ⊡ API Routes (Serverless Functions) ⊡ Fast refresh on develop environment
  6. “ ISR enables developers to use static generation on a

    per-page basis, without having to rebuild the entire site
  7. ISR ⊡ Faster Builds / Higher Cache ⊡ Headless CMS

    ⊡ Persist generated pages between deployments ⊡ Breaks atomic / immutable deployment
  8. WHAT'S NEXT? ⊡ Re-generating and invalidating multiple pages at once

    ⊡ Re-generating by listening to events (like CMS webhooks), ahead of user traffic