[wp-hackers] WordPress and Websockets
Eric Mann
eric at eam.me
Thu Sep 22 19:34:08 UTC 2011
On Thu, Sep 22, 2011 at 11:54 AM, Dougal Campbell <dougal at gunters.org>wrote:
>
> Have you looked at how the P2 theme does its dynamic front-page updates
> when new posts and comments are posted? You might be able to borrow code
> from there without too much fuss.
I have, and I plan to use that style of polling as a fallback, specifically
for browsers that don't support websockets (Internet Explorer 9 and below,
Firefox 4, etc). But as Braydon pointed out, polling isn't quite real-time
data exchange.
One option would be to enable websockets on the server if the server is
capable of using them and defaulting to AJAX long polling if it isn't. If
that's the direction, what's the easiest way to detect *server* support for
the technology? Browser support is easy to detect using Modernizr ...
More information about the wp-hackers
mailing list