Streaming HTML out of order without JavaScript

The demo at https://ooo.lamplightdev.workers.dev showcases a clever technique using Shadow DOM without Custom Elements to stream HTML out of order. By utilizing Shadow DOM with Declarative Shadow DOM and a templating language like SWTL, it is possible to send HTML chunks as they are generated and still have the browser render them in the correct order. This technique enables immediate rendering, early downloading of assets, and server-side streaming responses without the need for heavy JavaScript or full stack frameworks. The code example provided demonstrates how this approach can be implemented. Overall, it’s a fascinating method that opens up new possibilities for web development.

https://lamplightdev.com/blog/2024/01/10/streaming-html-out-of-order-without-javascript/

To top