[wp-hackers] WordPress and Websockets
Eric Mann
eric at eam.me
Tue Sep 27 16:18:03 UTC 2011
At the Portland WordPress User Group meetup last night, someone recommended
an alternative to Websockets that might fit my use-case. The HTML5 spec
also includes a definition for Server-Sent Events. It's not two-way
communication, but still allows the server to asynchronously push data to
the client without the use of AJAX long-polling.
It works in all of the major "modern" browsers (Chrome, Firefox 6+, Safari,
Opera) ... but will need to fall back to an alternative for older versions
or for anything IE (and no, not even the IE10 developer preview supports
SSE).
Additionally, SSE will work with a stock Apache setup ... no need to install
Nginx or host the system on a central location (both of which were solutions
I was dreading for a plugin). It communicates over standard HTTP, so no
additional protocols need to be set up at all.
So I'll still benefit from the new systems defined by HTML5 ... just not the
ones I *thought* I'd end up using. Thanks to everyone who took a stab at
the question, though. I'll eventually find a WP use case for websockets,
and this will definitely come in handy!
More information about the wp-hackers
mailing list