HTML-over-WebSockets revives server-rendered SPAs
Andros Fenollosa explains how persistent WebSocket connections can deliver server-rendered HTML directly to browsers, enabling real-time SPAs with minimal JavaScript. The approach, implemented by tools such as Django LiveView and Phoenix LiveView, removes much of the client-side rendering and API-contract overhead.
HTML over WebSockets is a compelling antidote to frontend complexity, but its server-side state and persistent connections make infrastructure tradeoffs unavoidable.
- –Keeps rendering logic, application state, and database access in one backend codebase
- –Enables real-time bidirectional features such as chat, dashboards, collaboration, and multiplayer games
- –Reduces client-side JavaScript and eliminates much of the JSON API synchronization layer
- –Requires more server resources and careful scaling with ASGI, Redis, and connection management
- –SSE or htmx remain better fits when applications need one-way updates or ordinary request-response interactions
DISCOVERED
1h ago
2026-08-12
PUBLISHED
5h ago
2026-08-12
RELEVANCE
AUTHOR
redbell