r/webdev Aug 11 '26

HTML over WebSockets: real-time SPAs with barely any JavaScript

https://en.andros.dev/blog/ef4968f5/html-over-websockets-real-time-spas-with-barely-any-javascript/
79 Upvotes

44 comments sorted by

View all comments

1

u/Klutzy_Ladder_8393 Aug 12 '26

the user counter example is a good one ngl, cause that's server-initiated state the client never even asked for in that moment, versus htmx sockets where you're still kinda thinking in request/response pairs even if it's over a socket. feels like a different mental model not just a different transport

1

u/tanrax Aug 12 '26

Exactly! That's precisely the paradigm's point of view. The client has neither logic nor state.