wcc icon indicating copy to clipboard operation
wcc copied to clipboard

Streaming HTML

Open thescientist13 opened this issue 3 years ago • 1 comments

Type of Change

  • New Feature Request

Summary

Would like to explore how to provide a streaming API that could also break apart the page at render roots.

So for example a page like this could come out in multiple flushes

<body>
  <my-header></my-header>
  <my-app></my-app>
  <my-footer></my-footer>
</body>

Would flush across those component definitions / boundaries / islands.

Details

To go even further, maybe we could recursively stream nested roots? Like in this example wcc-architecture

Links / References

  • https://tech.ebayinc.com/engineering/async-fragments-rediscovering-progressive-html-rendering-with-marko/
  • https://blog.codinghorror.com/the-lost-art-of-progressive-html-rendering/
  • https://www.facebook.com/notes/10158791368532200/
  • https://dev.to/tigt/the-weirdly-obscure-art-of-streamed-html-4gc2

thescientist13 avatar Apr 26 '22 00:04 thescientist13

Hmm, this thread seems to imply that streaming with DSD is not possible, and that a DOM is needed server side. For the second part, I wonder if wcc (AST parser) is exempt from that classification and maybe we could stream?

thescientist13 avatar Apr 26 '22 01:04 thescientist13