4 ms·
This is called Server Sent Events, SSE for short. https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events https://develope
by dento 3y ago
This is called Server Sent Events, SSE for short.
https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events https://developer.mozilla.org/en-US/docs/Web/API/Server-sent...
- disntthinkthis 3y agoThat’s the modern variation. The original didn’t have any framing like they.
- gfv 3y agoSSE came along much later. At the time it was common-ish to just slowly send HTML tags. I think at some point there was a gorgeous hack where they dynamically rendered and sent GIF frames with the messages of the chatroom.
- loo 3y agoThe broader technique became known as Comet: https://en.wikipedia.org/wiki/Comet_(programming) https://en.wikipedia.org/wiki/Comet_(programming) CGI:IRC used an early frame approach, no JS required. At some point JSONP became popular, even for 3rd party APIs. <script src="http://dont-xss-me/please?format=jsonp&callback=lol"> Server writes: lol({ ... }) lol({ ... })
- jchw 3y agoSSE is cool, but as others have pointed out, this isn't that. I also wouldn't call this Comet: almost unilaterally, Comet referred to using it in concert with JS/Ajax and usually was just a fancy way of saying long-polling (though I admit it's a bit broader than that in truth). What CGI:IRC did was different: it streamed HTML directly. More to the point, it didn't use chunked encoding or any kind of framing in the body. It just kept the connection open and kept sending HTML in realtime. I don't think this ever had a term associated with it, or at least I was never aware of one.
- loo 3y agoLooks like 'Comet' got coined in 2006. The CGI:IRC approach.. I had a smile and an "aha" on seeing the term "forever frames" :-) I think the wiki page is wrong that it involved chunked encoding
- jchw 3y agoWoah! I completely and entirely forgot the term "forever frame" existed. Another term you don't see too often these days is the "holy grail" layout. I definitely remember the days of messing with negative margins and clearfix to get my page layouts to look nice while still working in IE 6 :)
- loo 3y agoMe too :-D I think you're right that Comet refers more to the JavaScript techniques that came from those "forever frames".. but to me it was all about the streaming HTTP hack at the heart of it. I guess it's academic now :-) Regarding holy grail layout and IE6.. so you're telling me you're a masochist!