Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

151–160 of 516 posts

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

#151
Most of my personal app projects are SPAs, because it’s easy to just pop some static files in my static file server and serve a whole app with routing and functionality without having any server logic. Way simpler to maintain, since I can just sync my ‘apps’ dir and all my mini-projects are deployed.

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

#152
Ok, now try to implement a tree component in an MPA. But not a crappy tree component that only opens one branch at a time, like in a page from 1998. A tree component that remembers the open/close state of each branch.

Before the SPA, these were common issues. That’s why there were a gazillion Java server pages frameworks to solve them. You also have frameworks that tried to encode the UI state in some way. My favorite was Seaside, which used continuations to store the UI state.

The following article should probably be titled “It’s time for modern bloggers to kill the clickbait titles” and discuss the trade-offs of each architectural decision more balancedly.

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

#153
I think this article is unfair to SPAs. SPAs are a lot more effort, but they are better. For a long time they have been the only way to "make it feel like an app." (I think the author says "make it feel like an app" because they know we all resent app fatigue, all the apps we have to download that should just be web sites, but I think we also all know that when something really is an application, it's rare for a "web app" to match the experience of a local native application, and an SPA is the only way to make a sincere attempt.)

The comparison of bloated SPAs with lean web sites is bogus. If someone takes the effort to make their web site lean, they'd do the same with an SPA. If someone makes a slow, bloated SPA with megabytes of Javascript, they'd make a slow, bloated web site with megabytes of Javascript. I think we've all seen enough of the web to know this is true.

I click on articles like these because I've seen the effort that goes into a good SPA, and I'm interested in anything that would allow people to deliver an equivalent experience with less effort. All I see here is a tiny bit of cosmetic polish. Polish is appreciated, but this doesn't seem like something that would tip the balance between building an SPA or not. Am I missing something?

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

#155
post #151

Most of my personal app projects are SPAs, because it’s easy to just pop some static files in my static file server and serve a whole app with routing and functionality without having any server logic. Way simpler to maintain, since I can just sync my ‘apps’ dir and all my mini-projects are deployed.

Can do all that without a SPA.

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

#156
post #10

SPA is not only about seamless transitions but also being able to encapsulate a lot of user journey on the client side, without the need of bothering server too much. Let me give you an example - one of my biggest gripes about web ux is the fact that in 2025 most shops still requires you to fully reload (and refetch) content when you change filters or drill down a category. A common use case is when you come to a sho…

Thing is, and I believe it's a valuable example counterpoint, if I shift-click on a link, like sci-fi category, to open it in a new tab(very common thing people do), having a multi page application is zero work added, on an spa you have to manage that. If the link doesn't exist and categories can only be accessed by a select input then ux isn't that great

This is so annoying when SPAs break browser functionality like open link in new tab. Even if it works often it has to reload a bunch of JS again, which makes things veeery slow. This is why I really don't like Linear, I often open issues in separate tabs, which is every time a pain, browser freezes for seconds just to open a link in a tab...

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

#157

Earlier quoted context omitted.

No one said SPAs have no place, but 99% of websites out there don't need to be one.

SPA means single page app . For example, Google docs, Figma, Google calendar, etc. Apps that use web technologies instead of being native apps. A long time ago some webdevs started abusing the SPA concept to build simple websites. However that is not within the original meaning of the term SPA, because simple websites are not web apps. The author assumed that everyone would just understand that they are talking about…

So you describe the 1%? Is this to refute the person you’re replying to?

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

#158

It's worth noting that the Speculation Rules API and the View Transition API are not stable in Firefox and therefore aren't supported by all major browser.

yeah, if it's not in firefox it doesn't count.

https://bugzilla.mozilla.org/show_bug.cgi?id=1823896

also mobile safari so basically all iphones.

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

#159
Everyone is completely missing the point of this article, which I find amusing and terrifying in equal measure.

He is _not_ talking about a SaaS dashboard SPA. He's talking about marketing sites and other content heavy stuff like blogs, landing pages, etc. It mentions this in many places if you go past the headline.

He is completely correct. SPAs should not be used for marketing sites full stop. Perhaps there are some edge cases where it may make sense (though I cannot think of any) but in general, if you are building anything that resembles a blog or landing page with nextjs et al you have done it wrong, close the code editor and start again. I'll give you a pass if you are developing an MVP of something and you need something up very quickly, but if you have any commercial traffic you will thank my later.

I have done a lot of audit work for this kind of stuff. Things I've seen:

10MB+ of React/JS libs to load a simple blog page

Putting images in the bundle, base64d. So badly that the page crashes OOM on many devices.

And my favourite of all time - shipping 120MB (!) of JSON down for a catalog. It literally loaded _the entire database_ to the front end to show _one_ product. It wasn't even an ecommerce site; it was literally a brochure of products you could browse for.

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

#160

The view transitions API is a disaster. I spent weeks trying to get it to behave predictably and failed entirely. Don’t use this api if you value your sanity it’s the worst api I’ve used in a browser.

What particular issues have you experienced?

It’s extremely hard to use reliably.

Anyone enthusing about this API hasn’t done much with it.

Post reply on HN