Self updating applications
Java Script can be used in a web browser to display the user interface (UI), run application logic, and communicate with a web server.
Mature open-source libraries are available that support the building of an SPA, reducing the amount of Java Script code developers have to write.
In the case where HTML is returned by the server, Java Script on the client updates a partial area of the DOM (Document Object Model).
In this way, when any request hits the server (usually user actions), the server sends the appropriate HTML and/or Java Script with the concrete changes to bring the client to the new desired state (usually adding/deleting/updating a part of the client DOM). Most of the logic is executed on the server, and HTML is usually also rendered on the server.This gives users the ability to download the SPA from a server and run the file from a local storage device, without depending on server connectivity.If such an SPA wants to store and update data, it must use browser-based Web Storage.A single-page application (SPA) is a web application or web site that interacts with the user by dynamically rewriting the current page rather than loading entire new pages from a server.This approach avoids interruption of the user experience between successive pages, making the application behave more like a desktop application.