4 ms·
Stop griping about SPAs. Local compute is powerful and lower latency than the data center across the country or world. Page weight isn't that big of a deal, a
by randomtwiddler 4y ago
Stop griping about SPAs. Local compute is powerful and lower latency than the data center across the country or world.
Page weight isn't that big of a deal, a 2 MB ball of js is nothing compared to the multi megabyte pictures and videos people routinely add to pages.
For some use cases MPA is fine, but in many cases it's actively worse and higher dev costs to boot.
Service workers are an interesting middle ground I think should see more attention and development. I like to combine service workers with SPAs for fully offline capable web apps.
- deleted 4y ago[deleted]
- jhgb 4y ago> Page weight isn't that big of a deal, a 2 MB ball of js is nothing compared to the multi megabyte pictures and videos people routinely add to pages. That's a good argument if you're one of the people adding multi megabyte pictures and videos to your pages, but I'd bet that if page size is of concern to you, you're not one of them, so "a 2 MB ball of js" would suddenly become your weakest link.
- randomtwiddler 4y agoYou say "weakest link" like there is an optimum. People are regularly downloading 4k video. By choice, they want to be doing this. Amazon is one of the most successful websites ever created and last I checked came in at over 12MB page weight. Mostly highly optimized images. I'm sure they wrangle and agonize what shows up there. There's a limit somewhere, but pointing the finger at a ball of js that compresses to less than 500k isn't particularly reasonable. User experience is more about latency. Be it from local compute or remote compute+network. If your visitors are one and done you must SSR at a minimum. Because that will drive the average latency of the majority of user experience. If they are long term users, you should seriously look at user local data and potentially full offline functionality that can mask even poor 3g performance and spotty networks. Making users suffer long term through an MPA architecture is silly.
- cyral 4y agoAnd you end up saving that 2MB at some point since every page load is just some JSON instead of waiting for the server to render a whole new page that is mostly a duplicate of the current page.
- randomtwiddler 4y agoPage 2 definitely has big wins, not only for the user but in reduced server load and thus cost. That is really the key bit of information in answering the question, to SPA or not to SPA.