frameworkEngineering & architecture

Multi-Page Application (MPA)

A multi-page application uses browser document navigation to request and load a new HTML document for each primary route transition.

Download Markdown (.md)

01What it means

A multi-page application (MPA) is a web delivery architecture where navigation between primary URLs loads new documents from a server or static host. Each response can contain complete usable HTML and may add JavaScript for local interactions. MPA does not mean a site is static, uninteractive, or rendered from hand-written files.[1][2]

Document navigation lifecycle Each primary route loads a new usable document
  1. 01Link or formStart standard navigation
  2. 02Resolve routeServer or static host
  3. 03Return documentComplete usable HTML
  4. 04Replace pageInitialize resources and state
  5. 05Navigate againCache shared assets where possible

An MPA can be dynamic and interactive; the defining boundary is document replacement between primary URLs.

02Why it matters

Document navigation provides built-in URL, history, loading, focus, and failure behavior with a small client runtime. It can simplify delivery and resilience, although full navigations may reset transient state and repeat shared resource work.

03When to use it

Use an MPA for content-led sites, forms, commerce, or workflows whose routes can operate as independent documents. Add client-side islands or enhanced navigation selectively when measured interaction needs justify the additional state and complexity.

04How it works

  1. Each meaningful route resolves to a server or statically generated document.
  2. A link or form action starts the browser's standard navigation lifecycle.
  3. The server or host returns HTML plus referenced styles, scripts, and media.
  4. The browser replaces the active document and initializes its resources and accessibility state.
  5. HTTP caching and shared assets reduce repeated transfer across navigations.

05A practical example

Example

A public-service application uses a separate server-rendered document for each eligibility step. Standard forms still submit and recover without client JavaScript, while a small script enhances postcode lookup without taking over routing.

06Where it breaks

Full navigations can interrupt media, clear in-memory state, and feel slower when responses or assets are poorly cached. Complex real-time workspaces may need more client coordination, while careless duplication can increase server-template maintenance.

Common mistakes

  • Describing every server-rendered site as static or noninteractive.
  • Reloading large uncached assets on every route.
  • Storing necessary workflow state only in the outgoing document.
  • Adding SPA-style navigation without preserving the MPA's resilience and semantics.

07Sources

  1. HTML Standard: Loading Web PagesWHATWG · Living web standardHTML Standard: Loading Web Pages
  2. Rendering on the Webweb.dev · Official technical guidanceRendering on the Web
View saved topics

Start typing to search titles, definitions, categories, and frameworks.