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

This entry was posted by Rick Waldron (@rwaldron) on May 26, 2010 in Chromium, Google, HTML5, JavaScript and V8.

Comments

Author

This entry was posted by Rick Waldron (@rwaldron) on May 26, 2010 in Chromium, Google, HTML5, JavaScript and V8.

Recent posts from this author

Related on the Bocoup Blog

Advertisement

Twitter

Google+