marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.36k stars 643 forks source link

Is support for HTTP2 in the roadmap? #1273

Closed StarpTech closed 5 months ago

StarpTech commented 5 years ago

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 like server-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

ianvonholt commented 5 years 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.

tigt commented 4 years ago

While HTTP/2 does forbid Transfer-Encoding: chunked, it still can stream partial responses, just like chunked TE.

DylanPiercey commented 5 months ago

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.