New blog post: "The balance has shifted away from SPAs" https://nolanlawson.com/2022/05/21/the-balance-has-shifted-away-from-spas/
Just some random thoughts on why it seems like people are turning on SPAs recently. I suspect it's less of a pendulum swing in popular opinion and more because the underlying browser technology has changed.
@nolan Another thing MPAs don't do (and probably never will): serve apps without the server-side hassle. There are many services and ways to host static apps easily and for free (it's arguable whether this is good, but it lowers the barrier of entry). But as soon as you need a server component, things get a lot more complicated. Building it this way also makes apps more portable.
Maybe I'm mistaken about the hassle of server-side computing though? That's been my experience at least.
@nolan But wouldn't you need to have an html file with that name? For example, if I'm trying to have the url /user/123456, don't I need to have a /user/123456.html static file?
Maybe this can be worked around if the server allows you to customize the 404 html, and implement your thing in there. But the status code would still be a 404 I think, right?
Well in any case, regardless of it being possible or not I think we'd agree that by that point the complexity is not too far from doing an SPA :)
@noeldemartin Sure you can. The service worker can intercept any HTTP request and respond with whatever it wants.