16 ms·
> Blog posts are making the rounds listing all the challenges with SPAs: history, focus management, scroll restoration, Cmd/Ctrl-click, memory leaks, etc. I gu
by tomphoolery 4y ago
> Blog posts are making the rounds listing all the challenges with SPAs: history, focus management, scroll restoration, Cmd/Ctrl-click, memory leaks, etc.
I guess? Like, who is implementing all this BS themselves? Every time I've written a SPA, my framework and/or routing library handled all this crap for me. None of these "challenges" were ever problems for me, and this sounds like another case of programmers creating an issue where there actually isn't one.
If you use a proper framework or routing library that changes the history state of the URL, it's pretty much impossible for users to tell whether something is a SPA or an "MPA". So who cares?
- nullbytesmatter 4y agoAnd yet, a large portion of big websites using SPAs don't seem to have functioning back buttons. If a billion dollar company can't get it to work properly I doubt anyone else can.
- presentation 4y agoOr maybe that billion dollar company's users don't change their preferences based on back button behavior so they feel no need to fix it.
- tuyiown 4y ago> If a billion dollar company can't get it to work properly I doubt anyone else can. Billion dollars companies rarely delivers high quality software, especially in the UI area.
- SebastianKra 4y agoBack buttons in web apps are hard regardless of SPA or MPA. I've seen many MPAs fail, for example after checkouts or form submissions. The problem is just more prominent with SPAs because they usually feature more complicated navigation. Perhaps for privacy reasons, you don't get much control over the built in history: you can push, replace and pop. Maybe you could implement your own history, but then you need to somehow keep that in sync with the browser. If someone knows a good approach, I'd be interested.