What is a SPA (Single Page Application)?
A SPA (Single Page Application) is a single-page web application that loads once and then dynamically updates the content on the page without a full reload. Instead of requesting a new HTML page from the server every time, a SPA loads only the data and partially updates the interface.
How it works
- on first load, the base HTML + JS + CSS is loaded
- further user actions (navigation, clicks) trigger AJAX / Fetch / Web API requests
- the server returns only data (for example, JSON)
- the interface updates via JavaScript right in the browser
What this provides
- fast navigation without a page reload
- smooth UX, similar to mobile apps
- less traffic, since only data arrives, not the whole HTML
Where it's used
- online services
- personal dashboards
- admin panels
- social networks (Facebook), email clients (Gmail)
In one sentence
A SPA is an application that runs in the browser like a full-fledged program, updating only the necessary parts of the page instead of reloading it completely.
Short Answer
Interview readyPremium
A concise answer to help you respond confidently on this topic during an interview.