How to Get Rendering Strategies for Websites Right
The choice of where and when a page's HTML is produced: on the server for each request, at build time as static files, or in the browser by JavaScript.
On this page
At a glance
- Server-side rendering HTML generated on the server for each request
- Static generation HTML generated once at build time and served as files
- Client-side rendering the browser builds the page with JavaScript after it loads
- Hydration attaching JavaScript behavior to HTML that was rendered on the server
- Google and JavaScript Google renders JavaScript, but as a separate stage that can happen later than crawling
Why it matters
Why it matters: The choice affects speed, hosting cost, how quickly content updates appear and whether search engines see the content without running scripts.
Best practice
- Choose a strategy per page type rather than for the whole site
- Put important content in the initial HTML
- Rebuild or revalidate static pages when their content changes
- Measure hydration cost on mid-range phones
- Cache server-rendered pages at the edge where content allows
Common pitfalls
Watch out for:
- Client-side rendering for content pages that need search traffic
- Shipping a full framework bundle for mostly static pages
- Static builds so slow that urgent corrections take an hour to publish
- Assuming every crawler and preview bot runs JavaScript
When to call in a specialist
Bottom line Bring in help when pages load slowly despite a fast server, when content changes take too long to appear, or when search engines index empty templates.
Where this comes from
- web.dev — Rendering on the web
- Google Search Central — Understand JavaScript SEO basics
The figures and practices above come from the sources listed.
Working on something like this?
We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.
Where to go next
Spotted something wrong? Report an error on this page. We correct on the page and say what changed.