What is a Single Page Applications (SPA)?
The concept of Single Page Applications appeared in the early 2000s. The goal is to develop a web application accessible through a single page. This way, a client visiting your web pages does not need to reload the page with each new action he does and the navigation of the user is smooth. The experience in most cases is so smooth that the user barely notices that the content “loads” on the device. As a result, more and more websites start turning their pages into SPA.
Between 2007 and 2013, many competing frameworks and libraries appeared, to help developers implement SPA. Today, the most popular are AngularJS, React (developed by Facebook) and Ember.
In the case of a single page web application, a single web page is loaded into the visitor’s browser, the next web page being displayed dynamically according to the user’s actions. A popular way to load new content on the page when an action is performed is the load the content making asynchronous AJAX calls, and injecting the new content received from a server into the page section that needs to be updated without needing to reload the page, nor change the content on the rest of the page.
As an example, Facebook uses SPA for comments. When a new comment pops on the user’s screen, the user sees the new comment without needing to reload the page. Another example is Gmail from Google, which makes AJAX calls and shows the new emails received in the mailbox without having to reload the page.
Because of the increased user experience offered by SPAs, many sites now start using it, especially to improve the experience on mobile devices, where pages seem to load continuously without a long loading time between each action.
Check our why SPAs haven’t invaded the web yet in our following article: How to optimise SEO for Single Page Applications.