- who we are
- What We Do
- Contact Us
Single Page Applications or SPAs have been the talk of the town in web development world. Even major tech giants like Google and Facebook have jumped in and open sourced their frameworks- Angular JS and React JS. And if you look at Github you see SPA frameworks are one of the most starred repos. React has 75k stars, VueJS has 66k and Angular has 57k.
Though SPAs aren’t exactly a new thing (in internet terms) and date back as far as 2002. Stuart Morris wrote first one at slashdotslash.com, in it’s most primitive form. Earlier SPAs were only used for SaaS dashboards and form heavy apps, but lately it’s everywhere.
Have you visited, IMdb, Netflix, Youtube or Instagram?
You’ll be surprised to know that they are all using SPA frameworks!
So let’s first look and try to understand what is it and do you need it.
Single Page Application aka SPA is exactly what it sounds like, it’s literally made of only one page! These are websites designed to provide a UX like a desktop or mobile application. The HTML, CSS, and JS are retrieved on the first-page load and after that, all that is loaded is dynamically in response to user action. So the view changes dynamically without loading an entire web page. It usually retrieves data from a REST backend.
The most obvious advantage is speed of course, it takes very less network resources after the initial page load. That’s because after initial page load no more HTML gets sent over, instead only data gets sent over, which consumes lot less time and bandwidth. And this gives it more of app like feel rather than traditional websites.
Showing different content to Google than to normal web visitors is considered as “Cloaking” by Google, but for single page apps, they do have an exception. For SPAs, their crawler will send an _escaped_fragment_ query parameter in the request, and the origin server can then choose to return a document that represents the content a user will actually see when the single page app is running. Or, at least that’s what they used to do from 2009 to 2015.
In 2015 Google released the following statement:
While Google claims this, Bing, Yandex and other all support Google’s standard for Ajax Crawling. So here are some relevant things to keep in mind while making SPAs that are not hidden behind a login page or where SEO is a need.
So while Google has deprecated it’s Ajax Crawling Standard, it has not yet abandoned it. It still uses it but recommends not using it, so follow Ajax Crawling Standard while making SEO relevant websites if possible. Use server-side rendering if possible to render stuff that is of absolute importance. Also, there are various pre-rendering services available whose support covers all the SPA frameworks currently in the market, such as:
Prerender.io also provides an open-source version of their service for self-hosting.
Although currently, the Search Engine Crawlers don’t always support SPA indexing 100% that doesn’t mean they never will. With the sudden surge in use of SPA usage they are also improving at a tremendous rate. So sit back, relax make SPAs and make sure to optimize it with this 60 Second SEO Checklist.