3 ms·
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 t
by arraypad 6y ago
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#Mixed-Replace https://en.wikipedia.org/wiki/Multipart/x-mixed-replace#Mixe...
- pronoiac 6y agoomg! 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/ https://pronoiac.org/misc/2009/10/server-push-animation/
- bullen 6y agoThe 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 https://github.com/tinspin/fuse
- jswrenn 6y ago> although apparently only images in Chrome since 2013 I wonder if this includes SVG images... EDIT: It does!