Knowledge Maxxing
← Back to topic library
Dev MaxxingIntermediateNext.js75 sec

Static rendering

Static rendering generates a page's HTML once at build time, then serves that same pre-built file for every future request until it's rebuilt.

Prerequisite: Server-side rendering

What matters

Because the page is already built, static rendering can be extremely fast to serve, but it's only appropriate for content that doesn't need to change on every single request.

Example

A blog post page whose content rarely changes can be statically rendered once at build time and served instantly to every visitor from that pre-built file.

Common misconception

Static rendering does not mean a page can never show fresh data; techniques exist to periodically rebuild static pages without switching to full server rendering.

Recall question

What kind of content is a good fit for static rendering instead of server-side rendering?

Keywords and related concepts

static renderingbuild timeNext.jsserver-side rendering

Related topics

Server-side rendering
Dev MaxxingIntermediate
Content delivery network
Dev MaxxingAdvanced