Websites are usually built with one of three rendering models — client, static, or server — but in practice these are rarely exclusive choices.
The Three Base Models
- Client: the server ships a bare
<div id="root"></div>and a JavaScript template fills it in. - Static: HTML is pre-rendered ahead of time.
- Server: a live server handles each request and produces the HTML response.
Most Sites Are Mixtures
- Structural split: static pre-rendering for most pages (blog posts, for instance), with a server handling the remainder (forums).
- Mostly static, but with a few empty
<div>s whose contents are client-rendered — a menu generated per logged-in user, say. - Primarily server-rendered, with a cache in front so it behaves statically.
- Statically rendered, then hydrated into a fully client-rendered site.
- Static plus server, where dynamic regions look like client-side rendering but actually execute in an edge function, landing closer to server-side rendering.
Next.js supports all three modes at once. In a 2020 interview, Tim Neutkens described it as pre-rendering pages either at build time with static site generation or at run time with server-side rendering, with hybrid arrangements allowed per page — some pages server-side rendered, some statically generated — rather than the whole app being locked to a single style. That release also made it possible to update statically generated pages without running a new build of the entire app.
Next.js allows you to pre-render pages. It creates HTML on a server at build time with static site generation or uses run-time rendering on the server side. Next allows you to do a hybrid of those. Unlike most other frameworks, you are not bound by, oh, I’m going to build my app completely statically generated.
Trade-offs
Client rendering is the most flexible option, but it brings worse performance, worse reliability, more strain on devices, and poor SEO. Static pre-rendering is the most robust, the fastest, and the most secure, but it is also the most limited; edge functions layered on top of static output help widen what it can do. Server rendering remains the classic blend of flexibility and speed, and has dominated the web for good reason.
Client rendering is also what delivers the single-page-app feel: no page refresh, snappy navigation, room for page transitions. Gatsby popularized hydration as a way to get both — a static pre-rendered payload that upgrades into an SPA as the JavaScript downloads. The goal worth wanting is that SPA feel without building an SPA, though something has to manage the behavior, and that something is always a pile of JavaScript.
Lightweight SPA Alternatives
Tom MacWright's "If not SPAs, What?" surveyed some current options.
- Turbolinks asks what the bare minimum is to get an SPA experience with no cooperation from the application. A link click is intercepted, an Ajax request fetches the new page, and JavaScript swaps the content in. It is trivial to adopt, but it is still JavaScript-driven and not especially smart about reducing bytes sent over the wire.
- barba.js focuses on page transitions.
- instant.page pre-loads and pre-renders a page just before the click, so the resulting page refresh feels less intrusive, especially with paint holding.
None of these fully replaces an SPA. Even with pre-rendering, paint holding, and lightweight pages, the loading spinner still appears, and the experience is not quite as smooth as a real single-page app.
Portals and Navigation Transitions
The <portal> proposal is another avenue. Portals resemble iframes and can be displayed like one, meaning the URL inside has already been rendered; the portal can then be promoted to become the active page, with animation applied during the switch. That makes a Turbolinks-style library built on portals easy to picture. But animating a rectangle into position is rarely the transition people actually want. Sarah's "Native-Like Animations for Page Transitions on the Web" shows the richer effect, and it is the reason Jeremy Keith responded to portals with "not portals," quipping that most single page apps are just giant carousels. He points instead to Jake Archibald's older navigation-transitions proposal.
I love this proposal. It focuses on user needs. It also asks why people reach for JavaScript frameworks instead of using what browsers provide.
Frameworks tend to fill gaps the browser has not yet closed: components like tabs and accordions, DOM diffing, styling of complex form elements, navigation transitions. Those problems are effectively R&D for future web standards — and, conversely, a good JavaScript framework should aim to make itself redundant.
A Practical Ordering
There is no single best rendering method; the right answer depends on the site. A rough priority order:
- Static HTML as much as possible
- Edge functions over static HTML for whatever needs to be dynamic
- Server-generated HTML for the rest
- Client-side rendering only where unavoidable



