3 ms·
The shift to SPAs happened around the same time as mobile browsing was becoming the norm. Phones were alright, but data speeds were really slow. So instead of
by amrocha 4y ago
The shift to SPAs happened around the same time as mobile browsing was becoming the norm. Phones were alright, but data speeds were really slow.
So instead of having to download an entire HTML page and all the assets used every time you navigate, people built SPAs. Download everything up front, and then fetch data with small API requests. This way even though first load might take a while, everything is cached, and the client just needs to query the API for data.
The other side of it is that websites used to be pretty simple, and as browsers evolved past IE10, the kinds of things people build on the web also got more complex.
- tryptophan 4y ago>So instead of having to download an entire HTML page and all the assets used every time you navigate, people built SPAs. Don't browsers cache css, images, and JS and all that automatically for like 15 years now?
- amrocha 4y agoYou can't cache the HTML though, and each page might use different assets (bundle splitting).