Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

191–200 of 516 posts

Re: It's time for modern CSS to kill the SPA

#191

SPAs make sense when your users have long sessions in your app. When it is worth the pain to load a large bundle in exchange for having really small network requests after the load. Smooth transitions are a nice side effect, but not the reason for an SPA. The core argument of the article, that client-side routing is a solution for page transitions, is a complete misunderstanding of what problems SPAs solve. So absolu…

> ...if you shared that misunderstanding of SPAs and used them to solve the wrong problem, this article is 100% correct. Agreed. The article was a frustrating read. The author is an SEO consultant. SEO consultants likely have a heavy focus on marketing websites. Actual apps and not marketing websites do benefit significantly from SPA. Imagine building Google Maps without SPA. You can animate page transitions all you…

Google maps is a mess these days. Its glitchy, slow, has broken navigation, and is overloaded with unpredictable dynamic content. It's even worse in the native android app. Id totally go for the original version but with the more recent vector maps.

Re: It's time for modern CSS to kill the SPA

#192

SPAs make sense when your users have long sessions in your app. When it is worth the pain to load a large bundle in exchange for having really small network requests after the load. Smooth transitions are a nice side effect, but not the reason for an SPA. The core argument of the article, that client-side routing is a solution for page transitions, is a complete misunderstanding of what problems SPAs solve. So absolu…

Low-bandwidth/spotty connections (combined with aggressive caching) are one of the strongest cases in favor of SPAs (emphasis on the A for Application, not website). Visit (and cache) the entire frontend for the app when you have a good-enough connection, then further use of the app can proceed with minimal bandwidth usage.

Honest question: Where are the places with low-bandwidth internet? Are we talking about cruise ships and satellites internet use cases?

Re: It's time for modern CSS to kill the SPA

#194

I'm fully convinced that it's time to kill SPAs on 99% of websites and that the community is too defensive on the topic.

I agree. SSR that hydrates to an SPA is a pain in the butt and not necessary most of the time. This is why I favor something like Astro for websites... I can drop in a react embed when I need to. It's just a right-tool-for-the-right-job situation imo.

I absolutely love Astro, and it's my default for new projects. And I honestly feel like it's the only framework using React/Vue for their intended purposes; which is as an interactive layer on top of your SSR UI.

Re: It's time for modern CSS to kill the SPA

#195
post #182
post #8

Earlier quoted context omitted.

What do you mean by 'interactive like a native app'? The article is focusing on two main parts of making things feel like an app: page view transitions and speed/preloading. To me, those seem like a big part of what makes a site/app feel interactive. And letting the browser do the work and having real URLs has other huge benefits I appreciate. But agree that for things like GMail, etc, a SPA approach definitely makes…

Those aren't the main parts of feeling like an app. Feeling like an app means taking an action doesn't load a new page. Feeling like an app means the concept of a page mostly goes away.

I guess that's my point. With instant loading thanks to preload and smooth view transitions, taking an action, while actually loading a new page, shouldn't feel like loading a new page. Should be indistinguishable from a SPA action.

At least that's the theory. There might be other tells that degrade the experience, but not sure what they are?

Re: It's time for modern CSS to kill the SPA

#197

Earlier quoted context omitted.

Low-bandwidth/spotty connections (combined with aggressive caching) are one of the strongest cases in favor of SPAs (emphasis on the A for Application, not website). Visit (and cache) the entire frontend for the app when you have a good-enough connection, then further use of the app can proceed with minimal bandwidth usage.

Honest question: Where are the places with low-bandwidth internet? Are we talking about cruise ships and satellites internet use cases?

There are folks who work with US-based nonprofits, NGOs, and agencies who live all over the world, including regions where local internet access is either non-existent or very slow. Some US-based organizations they work with have had to set up low-bandwidth methods of communicating. Yes - sometimes geosynchronous satellites are the only connectivity available.

Re: It's time for modern CSS to kill the SPA

#198

Earlier quoted context omitted.

Low-bandwidth/spotty connections (combined with aggressive caching) are one of the strongest cases in favor of SPAs (emphasis on the A for Application, not website). Visit (and cache) the entire frontend for the app when you have a good-enough connection, then further use of the app can proceed with minimal bandwidth usage.

Honest question: Where are the places with low-bandwidth internet? Are we talking about cruise ships and satellites internet use cases?

All over the world, including the United States.

Re: It's time for modern CSS to kill the SPA

#199

Earlier quoted context omitted.

I don't know, I think the most painful aspect of having to do a full reload is how I efficient the site is. The actual data is a few KB, but the page itself has to download 100 MB and the web browser is burning through a GB of RAM. Like I don't find Hacker News to be egregious to navigate, and nearly every nav is a reload. It runs fine on my 2008 laptop with 4 GB of RAM. But I go to DoorDash on the same device, and i…

Gmail takes 3s to load. And HN is a website, not an app.

> Gmail takes 3s to load

On a 2008 device, in 2025? On a mobile connection?

Re: It's time for modern CSS to kill the SPA

#200
post #145

Earlier quoted context omitted.

You mean a chat cliënt? That seems a good worse case scenario. If you limit history to the most recent message (and have an link to the archive at the top) you could simply reload the entire page on some interval that declines with message frequency (and when you submit the form) Since the html document is pretty much empty the reload happens so fast you won't see the flashing. With transitions it would be perfectly…

> You mean a chat cliënt? That seems a good worse case scenario. No, I mean discord. An application where you can chat, recieve phone calls and watch a live stream all at the same time. A pure html chat client is uninteresting - there have been realtime html chat clients since I was teenager, even before the release of jquery.

The things I was wondering about were: 1) can a non spa chat client be as good as a spa. 2) at what point is a spa justified. (is chat enough?)

Phone calls and live streams are things for which a tab needs to stay open. If you want to do other things simultaneously both the browser and the OS could facilitate it - but do so rather poorly.

It's not why people make spa's it seems?

Post reply on HN