1. 43

  2. 18

    Maybe your single page app is different, but the ones that I know break most of my browser’s features, such as the back and forward buttons, page refresh, bookmarking, sending a link, or opening a link in a new window or tab.

    Eh. I’ve been building SPAs for four years now, and not even my first hacks prototypes suffered from these issues. They’ve been solved for a long time.

    I only rarely encounter SPAs that have these problems (usually some business app originally built more than ten years ago), but frequently see ones that have been competently built to handle those cases.

    1. 7

      In general I agree, but Twitter for some reason likes to load wrong tweets when I follow a shared link. I know they are wrong because username in URL is clearly not the same as tweet’s author.

      Luckily I don’t have to do that often and this behaviour comes and goes. Still, while listed problems may be overstated I think they still exist.

      1. 2

        Yeah — pretty much all the SPA tooling that exists includes a URL routing library/component/thingy. I literally never saw a public web app where URL stuff is broken.

        1. 16

          As an example: Twitter. If you click on an image, but it is still to small to view it and then right click (“View image”) it to be able to see it at the original size. Then use the back button in your browser to go back it will jump to the start of your timeline instead of the place where you started from. Very annoying!

          1. 2

            I still don’t come into contact with too many SPAs (that I am aware of at least) in most of my browsing / web usage.

            1. 1

              I can never tell if this is the result of different sites or different expectations. Do people who write SPAs expect other sites to work like theirs without realizing that other users haven’t internalized the same model?

              I don’t think people are making up these complaints. I’d have to do a lot more research than I’m inclined to do to discover issues that might go wrong but never actually do. When I say an errant click causes a view transition I can’t reverse with the back button, it’s because that’s happened to me.

              1. 3

                I don’t think they are making up their complaints, but I suspect that they often don’t notice SPAs unless they are broken in obvious ways. And a lot of the things that get attributed to SPAs, I see more frequently on apps that are partially traditional server apps with lots of jQuery soup added to make things more dynamic.

              2. 1

                Microsoft’s Dynamics 360 CRM is horribly broken in this regard.

            2. 6

              The author seems to have trouble finding an example where SPAs shine

              When you have a multi step workflow, it’s usually extremely frustrating and error prone to mash it together with stateless HTTP requests taped together. SPAs let you work around that by preserving some state in the client (just like native apps)

              1. 7

                This is partially correct but suffers from the all-or-nothing approach. A more reasonable approach would be to move the workflow to the browser and leave everything else on the server. The fact that feature A can benefit from being implemented in the browser doesn’t justify moving features B, C, D, …, Z.

                1. 3

                  Even for this case, I find that just using cookie-based state is often simpler for both the developer and the user.

                2. 4

                  I’m not a massive fan of SPAs (they’re still easy to make horrible), but note that this is from the start of 2016, not three-quarters of the way through 2017. The picture has improved, IMO

                  1. 3

                    One of the SPA i really NOT enjoy using is cloud.digitalocean.com. I constantly keep refreshing the pages to make sure things are shown as I want.