Skip to content
Web Design & Development

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.

MediaScaleUp Editorial Team 2 min read 12 views
How to Get Rendering Strategies for Websites Right

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
What to do and what to avoid with rendering strategies for websites, side by side
Good practice against the usual mistakes, from the sources listed below.

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

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.

All services

The work behind this article, and what it costs.

MediaScaleUp Editorial Team

Articles here are researched, written and checked by the MediaScaleUp studio team before they are published, and dated when they are reviewed.

Keep reading

More in Web Design & Development