News for hackers. Stuff that matters.
Re:The balance has shifted away from SPAs by steve_adams_86 on Saturday May 21, 2022 @01:43PM (#31460076)
Prefetching content means you can literally load a new page instantly without rendering anything but the new content. It is inherently faster once the initial page has loaded, and the JS no longer needs to be all that large to accomplish it.

Like any technology, using it in the right place helps. This is great for documentation where the template and content slots are super consistent, for example.

There are places it’s not a great choice. It isn’t inherently worse, though.

Re:The balance has shifted away from SPAs by rcxdude on Saturday May 21, 2022 @10:03PM (#31464228)
This is the theory, and yet in practice my experience is almost always the opposite: MPAs load and render quickly and are responsive during use, SPAs are slow to load and render and often chug substantially. Some of the better SPA manage to beat mediocre MPA implementations, but it's not super common. I don't know how it so frequently gets screwed up so badly, but it's a really consistent trend (and this is across fast desktops with a good internet connection to mobile devices with not-so-great signal). For example, hacker news is way, way more usable to me than new reddit (which actually renders my browser unusable on a high end machine after some use).
Re:The balance has shifted away from SPAs by hinkley on Saturday May 21, 2022 @10:35PM (#31464398)
The impedance mismatch always seems to boil down to the fact that we have been told umpteen million times that most people end up on your website with a nearly completely evicted cache, and we (or at least, the people who resist) don't seem to believe it.

This is pretty much the default and a given for everyone who visits your site... except you. As the author, you likely use your application more than most users, you use it on a work machine (which has a smaller, more niche browser history), and you use it with the sort of network connection that software developers demand: you know, excessive.

We see what we expect to see, what we want to see, and most of us don't challenge that, or only do it perfunctorily. And if someone else does? Well that's just crazy talk. See? Everything is fine.

Re:The balance has shifted away from SPAs by tatersolid on Sunday May 22, 2022 @04:41PM (#31472532)
Our B2B SaaS apps are SPA and preload static assets in the background on the login screen, including the top 90% of used js, templates, and icons (simple to find via http log analysis). This improves the end-user perception of performance dramatically.

Accessibility with said SPAs is still a pain though. Even when you use correct semantic elements instead of DIV soup, the DOM usable by screen readers changes “out-of-order” frequently in SPAs, requiring lots of extra work to ensure an accessible experience.