Static, server-rendered or single-page? How modern websites are built
The way a website produces its pages affects speed, search visibility and cost. The main approaches, in plain language.
Two websites can look identical yet be built in completely different ways. The main question is where and when each page's HTML is produced.
Static sites
Pages are generated once, when the site is built, and served as ready-made files. They are extremely fast, cheap to host and secure. The limitation: content changes require a rebuild, which is fine for documentation or portfolios.
Server-side rendering (SSR)
The server builds the page for each request, using fresh data. Readers and search engines receive complete HTML immediately. It suits pages that change often or depend on who is viewing them, at the cost of more server work.
Single-page applications (SPA)
The browser downloads a JavaScript application that builds pages on the device. Once loaded, navigation feels app-like. But the first load can be slow, and content may be harder for search engines if not handled carefully.
The modern middle ground
Frameworks such as Next.js, Nuxt and Astro mix these approaches per page:
- Static generation with revalidation: pages are pre-built and quietly refreshed at intervals or when content changes — fast and fresh. This is how news sites can serve thousands of readers cheaply.
- Server components: most of the page is rendered on the server, with JavaScript sent only for interactive parts like search or menus.
How to choose
- Content that rarely changes → static
- News, shops and catalogues → static with revalidation, SSR where needed
- Dashboards and tools behind a login → SPA-style interactivity
The bottom line
The best modern sites send readers finished HTML quickly and add JavaScript only where interaction needs it.