Skip to content

Prerendering

Entry #251 / 700 · Chapter 5 · 5.4 Logs, SSR vs CSR, migrations and i18n · Read in Chinese →
In one sentence

Generating a static HTML snapshot ahead of time for crawlers, while visitors receive the interactive version.

Analogy Mental model

Cooking ahead and holding it warm. The guest who arrives is served immediately instead of waiting for the pan.

In practice What you actually do

Useful when a site cannot move to server rendering quickly. Detect the crawler, serve the snapshot, and regenerate it on every publish so it never describes an older page.

Where people get burned Pitfalls

The snapshot and the live page must say the same thing. When they diverge substantially, the practice stops being a rendering fix and starts looking like cloaking.

This entry was written in English from the Chinese original, not machine-translated. Read the Chinese version →