Login
You're viewing the ruby.social public feed.
  • Nov 22, 2026, 11:31 AM

    Going to need to write up this year's @perfnow; some incredible new data from @anniesullie et. al answers the biggest question(s) in frontend: should you build your site as an SPA?

    (hint: very likely "no", and the reasons rhyme with the patterns I've been writing about for a few years)

    💬 1🔄 1⭐ 0

Replies

  • Nov 22, 2026, 1:12 PM

    @slightlyoff @perfnow @anniesullie

    I'm generally against SPAs, vdom etc, but i'm curious where the actual problem lies?

    HTMX, datastar and good old jquery ajax, make an SSR MPA behave somewhat SPA-like. And Turbo Drive (and Frames and Streams) takes that idea to its extension

    And a ServiceWorker (or SharedWorker?)-side rendered app moves even more work (and state) to the browser. Local-first goes even further, and doesn't necessitate a SPA.

    It would be helpful to pinpoint the exact issues

    💬 1🔄 0⭐ 0
  • Nov 22, 2026, 1:32 PM

    @nickchomey @perfnow @anniesullie The problem, such as it is, lies in the architectural tradeoffs related to sending JS down the wire to create post-page-load interactivity. The SPA model (and it's descendands, including SPA + SSR, etc.) is premised on the idea that sessions are long, so it's "worth it" to send more JS up-front because we could win better interaction latency later. The problem is that this isn't a simple categorical choice; there's a texture to the sessions for each site.

    💬 1🔄 0⭐ 0
  • Nov 22, 2026, 1:32 PM

    In practice, this means that you are trying to satisfy the forumula I outlined here:

    infrequently.org/2024/11/if-no

    The top is total session interaction latencies, and the denominator is the number of interactions in the session. So if your payloads are larger for the first view, but sessions aren't very long, you wind up playing yourself....which is what my claim has been, and which Annie shows with CrUX data.

    💬 0🔄 0⭐ 0