开发者

What is the alternative to WebSocket for Firefox (and IE)

When looking for WebSocket on Firefox (or IE) ...

if ("WebSocket" in window)
{
    ...
}
开发者_开发问答else
{
    alert('Your browser does not support websocket');
}

They are both failing !

If they dont have any WebSocket, is there a way in JS to exchange some TCP message with a server ? (connect/send/recv ???)


Check out Socket.IO and Faye for portable implementations.


You can also use the web-socket-js which uses Flash to add WebSockets support. In fact, Socket.IO uses web-socket-js as a fallback if the browser doesn't natively support WebSockets. Socket.IO is very nice but if you just want lower level WebSockets support without requiring your backend to be written in Javascript then there are many WebSockets servers that exist.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜