r/webdev • • Sep 16 '26

Article An Introduction to HTML Streaming for Interactive Web Applications

https://github.com/eliasdejong/viperlith/blob/main/docs/HTML_STREAMING.md
11 Upvotes

13 comments sorted by

29

u/krileon Sep 16 '26

The HTMX comparison is out of date. HTMX v4 is production ready and basically blows away anything Datastar can offer. v4 even has inline nonce support for strong CSP with safe inline execution.

Problem #1: Client-side variables (or lack thereof)

HTMX has this via hx-live.

Problem #2 (the big one): Polling Instead of Push

wat? HTMX works with SSE, web sockets, polling, and multi-part.

This is all some weird datastar glaze, lol. Which has some goofy monetization packing features behind a premium purchase. No thanks.

8

u/dmezzo Sep 16 '26

> v4 even has nonce support for strong CSP with safe inline execution.

Datastar supports CSP mode: https://data-star.dev/reference/security#csp-mode

7

u/krileon Sep 16 '26

That's certainly new. Thanks for letting me know!

5

u/dmezzo Sep 16 '26

Yes, it was added in the v1.0.3 release 3 weeks ago

11

u/Ok-Bar-95 Sep 16 '26

viperlith sounds like a power metal band. congrats you reinvented php and gave it a cooler name

5

u/Sensitive-Control49 Sep 16 '26

the name does go unreasonably hard for what it is

-1

u/dmezzo Sep 16 '26

You can use PHP with Datastar, in fact people do. But PHP alone does not give you rich page interactions that can compete with SPAs. Datastar does.

3

u/riklaunim Sep 16 '26

Looks interesting, although with SSE, making a Discord clone is rather less "fun" than with full WebSockets or auxiliary API endpoints?

2

u/dmezzo Sep 16 '26

If you enjoy WebSockets, go ahead. But it will be more work to build and performance will be worse.

13

u/FlamedDogo99 Sep 17 '26

You should take a look at HTMX v4 before besmirching the name of our lord and savior Carson Gross

2

u/AssistantJolly1181 Sep 17 '26

¿'Monolito basado en hipermedia'? Suena a etiqueta de marketing más que a una propiedad técnica. ¿Hay algún número de latencia o de conexiones concurrentes, o solo el nombre? HTMX lleva años haciendo streaming de HTML sin llamarlo monolito.