Comments on: Streaming HTML https://frontendmasters.com/blog/streaming-html/ Helping Your Journey to Senior Developer Mon, 08 Apr 2024 11:52:31 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: niutech https://frontendmasters.com/blog/streaming-html/#comment-2098 Mon, 08 Apr 2024 11:52:31 +0000 https://frontendmasters.com/blog/?p=1193#comment-2098 As for PHP, check if output buffering is disabled in Apache httpd.conf and chunked transfer-encoding is enabled. Use your local development web server like XAMPP and request web page with curl first.

Have a look at my PHP and Node.js implementation of Pure HTML OOO Streaming (PHOOOS) with an online demo: https://github.com/niutech/phooos

]]>
By: Taylor “tigt” Hunt https://frontendmasters.com/blog/streaming-html/#comment-1669 Sat, 16 Mar 2024 18:32:07 +0000 https://frontendmasters.com/blog/?p=1193#comment-1669 Yeah, streaming HTML is weirdly off-by-default in a lot of server/proxy/CDN/etc. settings. I wrote a list of places to check in the Marko docs while I worked for them: https://markojs.com/docs/troubleshooting-streaming/

If I had to guess, it seems like your CDN is trying to be clever — when I refresh your demo page, it then loads instantly with HTTP headers calling it a cache hit, even when my DevTools request no caching. For Kroger Lite, our Akamai contact had to turn off all their value-add “acceleration” features (the irony was not lost on him).

As far as errors during a stream, that’s one of the few HTTP semantics that you CAN still transmit midstream. This discussion is a bit complex as it gets into the underlying plumbing across HTTP versions, but the gist is you want to write garbage to the stream or end it without the right terminator, so caches/search engines/etc. know the stream had an error: https://github.com/marko-js/community/pull/1

]]>