SPA (Single Page Application)
A SPA (Single Page Application) is a web application that loads once in the browser and then dynamically refreshes its content without a full page reload. Instead of fetching a new HTML document from the server on every click, a SPA updates only the parts of the interface that change, using JavaScript and background calls to an API.
How a SPA works
On the first visit the browser downloads a page shell and a JavaScript bundle that takes over rendering. From that point navigation happens on the client: as the user moves between views, the app fetches only data from the server (most often as JSON) and swaps the relevant elements, updating the URL without a reload. This makes interactions smooth and desktop-app-like.
A SPA is usually built on frameworks such as React, Vue.js or Angular. The price for that smoothness is a larger initial JavaScript payload and SEO challenges — which is why server-side rendering (SSR) or prerendering is used so that search engines receive ready content.
SPA in practice
The SPA model shines in highly interactive interfaces: admin panels, analytics dashboards, SaaS applications, chat tools and product configurators. Wherever a user clicks intensively and expects an instant response without flickering reloads, a SPA has a clear edge over a classic multi-page site. Hosting a SPA only requires static hosting to serve the files plus a separate backend API — and many such apps are later extended into a PWA, gaining offline support and installability.
Powiązane pojęcia
Najczęstsze pytania
Is a SPA SEO-friendly?
By default a SPA renders content in the browser, which makes it harder to index. To ensure good SEO, developers use server-side rendering (SSR), static generation or prerendering so that crawlers receive ready HTML instead of an empty page shell.
How is a SPA different from a PWA?
A SPA describes a rendering architecture — one page, dynamically refreshed content. A PWA is a web app with native-like traits: offline support, install-to-home-screen and notifications. Many apps are both SPA and PWA, but the two are independent concepts.
