This is the Bocoup web log with posts from Al, Ben, Boaz, Darius, Greg, Irene, John, Mike, Nate, Nick, Pete, Richard, Rick, Sam, Sam Clearman, Scott and Tim. You should also make sure to checkout code.bocoup.com, where we keep the finished versions of ideas we kick around here.



May 26, 2010

Chrome 6: Server Push Events with new EventSource()

This is mighty awesome. I’ve put together some test demos, to run them you’ll first need to get this Chromium build:


Then download these:

http://gist.github.com/415116




For something (only slightly) more involved

http://gist.github.com/415294




Both examples can be found here: http://code.bocoup.com/event-source/event-source-1.html http://code.bocoup.com/event-source/event-source-2.html

They have only been tested in a Chromium nightly and definitely don’t work in FireFox. Be sure to have the javascript console open when running these in order to see the output.


EDIT

In the comments below, there is some interesting info about how this is actually implemented, most notably the comment left by obigid and my reply to them.


More Findings, May 27, 2010

In case you’re wondering what kind of HTTP request is being made, it is a GET request. Here are the passing tests:

http://gist.github.com/415836 http://gist.github.com/gists/415836/download




Comments:




Please send your questions to this address or call Bocoup at 617-379-2752.
This web page is proudly maintained by Bocoup and hosted by (mt) Media Temple.
All code on this website is Open Source. Want to work at Bocoup? Then Apply.
HTML5 Powered with Connectivity / Realtime, CSS3 / Styling, Device Access, Graphics, 3D & Effects, Multimedia, Performance & Integration, Semantics, and Offline & Storage