Comment by TimTheTinker
5 days ago
Here is an excellent use case for SPA web apps. See - a lot of low bandwidth connections still exist in the US.
(Sorry to slightly hijack the thread. It's been an ongoing debate on HN)
5 days ago
Here is an excellent use case for SPA web apps. See - a lot of low bandwidth connections still exist in the US.
(Sorry to slightly hijack the thread. It's been an ongoing debate on HN)
How does this make sense? SPAs have notoriously large bundles shipped to the client. Maybe in a PWA where the service worker gets saved for offline use.
Traditional server-rendered HTML should be orders of magnitude faster than most SPA bundles though.
With a dial-up connection, you really want a native app that only hits the network for functionality that fundamentally needs to be done over the network. And you want the app to be hitting stable APIs, rather than requiring weekly updates to keep it in lockstep with a front-end server's constant development churn.
Or a terminal UI, since that usually worked well back when dial-up was common.
For content-driven sites - absolutely.
I'm talking about long-lived apps where work is being accomplished. An SPA allows downloading and caching al or most of the frontend, then further communication can proceed using minimal bandwidth as the user works.
With traditional SSR, every page/form the user navigates to requires downloading all markup, styles, and client-side behaviors for that route.
Each time I was on a limited connection, regular pages would load, slowly. Anything SPA would fail to load.
I'm willing to believe SPAs with everything handwritten, containing just the necessary code, could work but that's not how SPAs are usually written.
Not only this but very simple HTML with POST forms, in addition to being lightweight, benefit from a very robust handling, where you can retry stuff and all. SPA are usually bad at this.
All markup needs to be downloaded but it might be very light, and styles are hopefully cached, so it's an issue on first load only and SPAs don't solve this.
>SPAs have notoriously large bundles shipped to the client.
I haven't found this to be the case at all. What apps are you using?
>Maybe in a PWA where the service worker gets saved for offline use.
You know browsers have caches, right?
Exist, yes; a lot, no. Dialup accounts for around 0.25% of households with an Internet subscription according to the 2019 census: https://data.census.gov/table/ACSDT1Y2019.B28011?q=ACSDT1Y20...
Wow, there's more people with no internet than still on dial-up.
That's a good case for offline-first apps (served from cache and localStorage/indexedDB via a service worker).
Although native downloaded apps will probably be more usable & familiar in that case.