4 ms·
The primary argument in favor of SPAs is that otherwise the entire page and every resource on it has to be reloaded every time the user navigates, and the resul
by ameliaquining 9y ago
The primary argument in favor of SPAs is that otherwise the entire page and every resource on it has to be reloaded every time the user navigates, and the resulting user experience is vastly inferior to that of an SPA (or native app), especially for users on low-end devices and/or high-latency connections.
- tscs37 9y agoAlternatively, just don't load as much crap. I've purposefully reduced my website to a minimal amount of HTML so that even on connections with high latency and low bandwidth, it loads quickly into the browser. A lot of webapps I've seen lately could have just as easily been a lightweight, single PHP script with minimal styling and scripting. That saves battery and bandwidth. SPAs only save bandwidth.
- thinkxl 9y agoI see this argument everywhere, but, when the application is done properly, the reloading doesn't feel that bad. Related past threads: - Ask HN: Are there any solid arguments against SPAs in 2017? https://news.ycombinator.com/item?id=13315444 https://news.ycombinator.com/item?id=13315444 - Do you really want a single-page application framework? https://news.ycombinator.com/item?id=12956059 https://news.ycombinator.com/item?id=12956059 - The Disadvantages of Single Page Applications (2014) https://news.ycombinator.com/item?id=9879685 https://news.ycombinator.com/item?id=9879685
- stephenr 9y ago> every resource on it has to be reloaded every time the user navigates Since when? Browser cache is a thing that exists. > especially for users on low-end devices and/or high-latency connections I use an original iPad Mini (so basically the guts of an iPad 2 with a smaller screen) for occasional browsing. It definitely works better on simple, JS free pages. I use said iPad Mini in Thailand. Regardless of our ISP provided line-speed, connections out of the country are always a throttling point for data. Having a regular browser-provided loading indicator (which can actually be intelligent and use things like the Content-Length header) is definitely preferable to some in-page JS (see above) spinner that gives zero indication of what % is loaded, or if it's hung, or whatever. I am convinced at this point that SPA's basically exist to be 'portfolio' sites for front-end developers, the way designers would (maybe still do) create their own take on a popular app/website/etc and publish it, to show off what they're capable of.