Web Application Architecture: Single-Page, Server-Rendered or Static
A web application can render its pages in the browser with JavaScript, on a server for each request, or ahead of time as static files. Modern frameworks blur the lines with server rendering followed by hydration, static generation with periodic rebuilds, and partial interactivity. The choice affects how fast the first page appears, how search engines see the content, what hosting is needed and how hard the system is to operate. This article compares the three models.
At a glance
- SPA
- A single-page application renders in the browser and fetches data from APIs.
- SSR
- Server-side rendering builds HTML per request, so content arrives ready to display.
- Static
- Pages generated at build time and served from a CDN with no application server.
- 2.5 s
- The Core Web Vitals threshold for a good Largest Contentful Paint.
The problem
Single-page applications are often chosen by default. For a logged-in dashboard that is a sound choice, but for public content pages it means a large JavaScript download before anything useful appears, and content that search engines and link previews may not see reliably.
Server rendering everything has costs too: servers to run and scale, slower responses under load, and more complexity when state lives on both server and client.
Render public content on the server or at build time, and keep client-side rendering for the parts that genuinely behave like an application.
Measuring the result
Core Web Vitals give a common yardstick: Largest Contentful Paint for loading, Interaction to Next Paint for responsiveness and Cumulative Layout Shift for visual stability. Server and static rendering usually help loading; heavy client-side JavaScript usually hurts responsiveness on modest phones.
Devices are a special case. A configuration interface served by an embedded web server is usually best built as a small static single-page application calling a lightweight API on the device, since the device cannot afford server-side rendering.
What good looks like
Classify the pages into public content, logged-in application screens and device or admin interfaces, and note the search, speed and update needs of each.
Choose the rendering model per class rather than for the whole site; most current frameworks support mixing static, server and client rendering.
Measure Core Web Vitals on real mid-range phones and slow networks, and set JavaScript size budgets that the build enforces.
| Single-page app | Server-rendered | |
|---|---|---|
| First content on screen | After scripts load | With the first response |
| Search engine visibility | Less reliable | Full HTML |
| Interaction after load | Fast, no page reloads | Needs hydration or round trips |
| Hosting | Static files plus an API | Application servers |
| Offline and app-like use | Well suited | Harder |
| Metric | Measures | Good |
|---|---|---|
| Largest Contentful Paint (LCP) | Loading | 2.5 s or less |
| Interaction to Next Paint (INP) | Responsiveness | 200 ms or less |
| Cumulative Layout Shift (CLS) | Visual stability | 0.1 or less |
What it changes
Faster First View
Content rendered on the server or at build time appears without waiting for scripts.
Search Visibility
Public pages deliver complete HTML that crawlers and link previews can read.
Lower Hosting Effort
Static pages served from a CDN need no application servers to scale.
Fit for Purpose
Interactive screens keep the responsiveness of a client-side application.
Where to go next
Keep the API separate from the rendering layer. A clean API serves the web front end, mobile apps and device integrations alike.
Revisit the choice as the product grows. A static site that gains user accounts, or an SPA that gains public pages, may need a hybrid model.
Problems this prevents
- Public pages invisible to search engines
- A blank screen while scripts download
- Servers scaled for pages that could be static
- Device web UIs too heavy for the device
Discuss your project
Email support@aavico.com or use Get in Touch when the website finishes loading.