DEV Community

Cover image for What is a Single-Page Application [ SPA ]?
Ansub Khan
Ansub Khan

Posted on

What is a Single-Page Application [ SPA ]?

What is SPA?

SPA as the name suggests means when you load the app for once. In simple words, the pages don't reload when you click on something. on clicking on an element on the page, SPA only renders that element, instead of what traditional pages do (rendering the whole page with every 🖱)

If you Notice Gmail when you browse through your email you’ll notice that not much changes during navigation - the sidebar and header remain untouched as you go through your inbox.

The three most popular SPA tools are:

  1. ** Angular**: developed by Google and now almost ten years old)

  2. React: created by Facebook a few years later

  3. Vue: developed by an ex-Google employee and which has enjoyed a surge in popularity over the past few years.


Examples of SPA

  • Facebook
  • Google Maps
  • Gmail
  • Twitter
  • Google Drive

Pros of SPA

  1. Speed and Response Time because you are loading everything at once

  2. a better User Experience as users can access information very quickly.

  3. Caching as SPA only have to request data from the server one time, upon initial download.


Cons of SPA

  1. SEO is the biggest problem with SPAs because of fewer pages and HTML Content.

  2. will not work for users who have disabled Javascript in their browser


if you like this article then follow me on Twitter
I learn and try to simply stuff for you :)

Thanks For Reading!

Top comments (0)