Hacker News new | past | comments | ask | show | jobs | submit login

The core of this is of course the response header "Content-Type: multipart/x-mixed-replace" which in theory lets the server push updated chunks of any content type (although apparently only images in Chrome since 2013 [1]).

While it's a crude and handy way to update some content after the initial load without JS, it was also widely used with JS before Web Sockets - to push messages to clients with less latency than XHR polling.

[1] https://en.wikipedia.org/wiki/Multipart/x-mixed-replace#Mixe...




The big problem with this spec (which is shared today by all the HTTP uploads in the world) is that you have to check for the delimiter every byte!

"Content-Type: chunked" is much better because it gives you the size of each chunk upfront! But that requires .js and also was buggy in IE until version 7.

I made a multiplayer online system that relies on chunked: https://github.com/tinspin/fuse


omg! I thought it would slowly create and send along an mjpeg video file. Server push animation is a 90's thing. I wrote something up about it in 2009, and posted a still-working demo, because of a thread here. https://pronoiac.org/misc/2009/10/server-push-animation/


> although apparently only images in Chrome since 2013

I wonder if this includes SVG images...

EDIT: It does!




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: