Closed StarpTech closed 5 months ago
I'm actually pretty interested in getting something with HTTP2 up and running with MarkoJS since Chunked Transfer Encoding is forbidden with HTTP/2.
While HTTP/2 does forbid Transfer-Encoding: chunked
, it still can stream partial responses, just like chunked TE.
The current render apis expose an async iterator that you can use to take the html chunks flushed by Marko and do whatever you want with them.
Description
Marko heavily relies on asynchronous rendering and streaming. It use HTTP1
Chunked transfer encoding
to respond chunks out of the order which are then assembled on client side. With HTTP2 we can use more efficient mechanism likeserver-push
,Stream Prioritization
In-depth explanation: https://www.ebayinc.com/stories/blogs/tech/async-fragments-rediscovering-progressive-html-rendering-with-marko/
Browser support
https://caniuse.com/#feat=http2