Singple Page Application
# Introduction
::: tip SPA (Single Page Application) is popular web application technology today. :::
SPA uses HTML and Ajax to give users have advanced experience. Each new page does not load entire content from server, it uses Ajax to get html, css of page and rewrite on the current page.
In SPA, all necessary code (HTML, JavaScript, CSS) is retrieved with a single page load, and the appropriate resources are dynamically loaded and render to the page, usually is response to user actions.
SPA opposed to Multiple Page Application (MPA) – traditional way that every change (render, display, request data, ..) will make requests to server.
# Compare between SPA and MPA
| SPA | MPA |
|---|---|
| Pros: | Pros: |
|
|
| Cons: | Cons: |
|
|