I've just committed WebSockets support to Zotonic.
When WebSockets is available then it is used as a replacement for the Comet long poll.
You start a WebSockets connection by including the {% stream %} tag in your template.
This tag must be placed before the {% script %} tag.
For this I renamed the scomp {% comet %} to {% stream %}. Please update your templates.
Inside Zotonic you can send a script to the current web page using, for example:
z_session_page:add_script("alert('hello world');", Context)
The WebSockets supports will be part of the upcoming 0.3 release.
Regards,
Marc Worrell