Single-Page Application

A single-page application, or SPA, is a style of web app that loads a single document up front and then rewrites parts of that page on the fly rather than navigating to new pages. Mozilla’s developer documentation defines it as “a web app implementation that loads only a single web document, and then updates the body content of that single document via JavaScript APIs such as Fetch when different content is to be shown.”

The key shift is where the work happens. In a traditional site, each click asks the server for a whole new HTML page. In an SPA, the browser keeps the same page loaded and uses JavaScript to request just the data it needs and swap in new content. This makes interactions feel faster and more app-like, because users can work without waiting for full page reloads.

The approach comes with trade-offs. Mozilla notes that SPAs face challenges around search engine optimization, require more effort to manage application state, demand more complex navigation handling, and make performance monitoring harder than on conventional multi-page sites.

The pattern became practical as browsers gained the ability to fetch data in the background and update the document object model without reloading. It underpins many modern web apps and the JavaScript frameworks built to construct them.

Sources

Last verified June 7, 2026