An SPA is a web application or website composed entirely of static web resources such as HTML, JavaScript, and CSS, loaded just once into the web browser in a single page load. Once booted, it updates itself intelligently as the user starts interacting with it. Unlike traditional web applications that perform a full page refresh for screen navigations, SPA routes and redraws (re-renders) screens without reloading the whole page (or the next page) from the server. It reconstructs the DOM structure with the help of JavaScript and styles itself with CSS in response to user actions and application events in order to represent them on the screen.
After the initial boot, the only time an SPA confers with a server is for dynamic data. SPAs usually rely on AJAX or WebSockets for data access from the server. The data transfer format is mostly JSON and sometimes XML. They contact the server via AJAX over HTTP asynchronously behind the scenes; this gives a smooth, fluid user experience...