A single page application (SPA) is a website or web app that loads one HTML shell and a bundle of JavaScript, then redraws the screen itself whenever you click a link or button. The browser never does a full page reload, so moving around feels more like using a desktop app.
How an SPA changes "pages" without reloading
On the first visit, the server sends a nearly empty HTML file plus scripts built with a framework such as React, Vue, Angular or Svelte. The JavaScript renders the interface in the browser. A client-side router watches the address bar: when you click "Pricing", it updates the URL with the browser's History API, swaps in the pricing component and fetches any data it needs from an API as JSON. The header, menu and app state stay put; only the changed part redraws.
Familiar SPAs
Gmail, Google Maps, Trello and Figma's web app all behave this way. A small-business scenario: an equipment hire company gives trade customers a portal where they browse kit, check availability by date and manage bookings. Built as an SPA, the date picker, filters and basket respond instantly, because each click only requests a small piece of data rather than a whole new page. Tools like Vite are commonly used to build such bundles. We.Inc-generated sites use React, Vite, TypeScript and Tailwind CSS.
When an SPA is the right choice
SPAs shine for logged-in tools: dashboards, booking portals, editors, anything people use for minutes at a time. For public marketing pages that must rank in search and load fast on a first visit, a pure client-rendered SPA has drawbacks. Google can render JavaScript, but rendering may be deferred, and other crawlers and link-preview bots often read only the initial HTML. Many teams therefore pre-render or server-render public pages and keep SPA behaviour for the app part.
Common SPA mistakes
- Every route returning a 200 shell. Missing pages should still produce a real 404, or search engines report soft 404s.
- One title and description for all routes. Each view needs its own title and meta tags.
- Huge first bundle. Split code by route so visitors do not download the whole app to see the homepage.
- Broken back button or scroll position when routing is hand-rolled.
- Losing focus for screen-reader users after a view change, because no page load announces it.
Related terms
- React: the most common library for building SPAs.
- JavaScript framework: the category SPA tooling belongs to.
- Web app: what most SPAs are.
- Progressive web app: adds offline support and install prompts.