Dynamic rendering
Serving pre-rendered HTML to bots while serving SPA to humans — a transitional fix, not a long-term strategy.
Definition
Dynamic Rendering is the deprecated workaround where a server detects the user-agent: if it's a bot (Googlebot, GPTBot), serve a pre-rendered HTML snapshot; if it's a human, serve the SPA. Tools like Prerender.io, Rendertron, and Puppeteer-based services power this. Google deprecated official dynamic-rendering guidance in 2024 in favor of SSR/SSG. Still works but adds infrastructure complexity.
Example
Server checks user-agent. GPTBot → Puppeteer renders + caches HTML, serves it. Human → bare SPA loads.How to optimize
If you have a legacy CSR app and can't migrate to SSR, dynamic rendering is a stopgap. Otherwise migrate the framework — modern stacks make SSR/SSG trivial.