Skip to content
BENIBIX Learn

Single-Page Application (SPA)

Development🌐 Web DevelopmentRendering

Also known as SPA, Single Page App

A web app that loads one page once, then changes it with JavaScript.

Think of it like

Think of it like a puppet show with one stage. The puppets change, but the stage stays put.

Example

Lucy's email in the browser is an SPA. When she opens a message, only the middle part of the screen changes.

Why it matters

SPAs feel smooth and quick once loaded. Many web apps are built this way.

Definition

A single-page application loads one web page once and then changes it with JavaScript. When you click a link, the app swaps out part of the page instead of loading a new one. It asks the server only for data, not for whole pages. This makes moving around feel fast, like a phone app. The first load can be slow, because the browser must fetch all the code first.

Common mistake

Making a simple content site an SPA. Search engines and slow phones both handle plain pages better.

Key takeaways

  1. 1
    One page. Loaded once, then changed.
  2. 2
    Data, not pages. Only data comes from the server.
  3. 3
    Slow first load. All the code comes up front.

Compare