4 ms·
I'm kinda interested in how they did the server push animations. Does anyone know how exactly this was set up?
by Scriptor 17y ago
I'm kinda interested in how they did the server push animations. Does anyone know how exactly this was set up?
- lamby 17y agoUsing "Content-type: multipart/x-mixed-replace" and a while(1) on some server-side code pushing the frames out. I think you setup some boundary string that you promise will terminate each part. Heh, it sounds exactly like Comet.
- gaius 17y agoI'm struggling to remember now. It was done with MIME, but instead of finishing with an EOF after the boundary, you would start the next image. When it arrived (i.e. reached the next boundary) the browser would replace the image it had with the new one. It was similar in principle to HTTP/1.1 reusing a socket. It did have one use - if you were doing something "live" on the server, you could generate an image on the fly and send it, e.g. for self-updating graphs without reloading the page. After it fell out of fashion, it wasn't until Java that you could do that again.
- pronoiac 17y agoWhat they said already: funky mime types. You'd set auto-refresh for the browser, then push out the next part. Perl implementation: http://www.radzone.org/tutorials/animatep.html http://www.radzone.org/tutorials/animatep.html O'Reilly notes on it from 1996: http://oreilly.com/openbook/cgi/ch06_06.html http://oreilly.com/openbook/cgi/ch06_06.html
- pronoiac 17y agoHah! It still works on Firefox & Mobile Safari! http://pronoiac.org/misc/2009/10/server-push-animation/ http://pronoiac.org/misc/2009/10/server-push-animation/