哪些浏览器支持 HTML5 WebSocket API? [英] What browsers support HTML5 WebSocket API?

查看:22
本文介绍了哪些浏览器支持 HTML5 WebSocket API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将开发一个在浏览器中运行的即时消息应用程序.

I am going to develop an instant messaging application that runs in the browser.

哪些浏览器支持 WebSocket API?

推荐答案

客户端

  • Hixie-75:
  • Chrome 4.0 + 5.0
  • Safari 5.0.0
  • HyBi-00/Hixie-76:
  • Chrome 6.0 - 13.0
  • Safari 5.0.2 + 5.1
  • iOS 4.2 + iOS 5
  • Firefox 4.0 - 已禁用 WebSockets 支持.要启用它请参阅此处.莉>
  • Opera 11 - 禁用支持.要启用它请参阅此处.
  • HyBi-07+:
  • Chrome 14.0
  • Firefox 6.0 - 前缀:MozWebSocket
  • IE 9 - 通过 可下载的 Silverlight 扩展
  • HyBi-10:
  • Chrome 14.0 + 15.0
  • Firefox 7.0 + 8.0 + 9.0 + 10.0 - 前缀:MozWebSocket
  • IE 10(来自 Windows 8 开发者预览版)
  • HyBi-17/RFC 6455
  • Chrome 16
  • 火狐 11
  • Opera 12.10/Opera Mobile 12.1
  • Client side

    • Hixie-75:
    • Chrome 4.0 + 5.0
    • Safari 5.0.0
    • HyBi-00/Hixie-76:
    • Chrome 6.0 - 13.0
    • Safari 5.0.2 + 5.1
    • iOS 4.2 + iOS 5
    • Firefox 4.0 - support for WebSockets disabled. To enable it see here.
    • Opera 11 - with support disabled. To enable it see here.
    • HyBi-07+:
    • Chrome 14.0
    • Firefox 6.0 - prefixed: MozWebSocket
    • IE 9 - via downloadable Silverlight extension
    • HyBi-10:
    • Chrome 14.0 + 15.0
    • Firefox 7.0 + 8.0 + 9.0 + 10.0 - prefixed: MozWebSocket
    • IE 10 (from Windows 8 developer preview)
    • HyBi-17/RFC 6455
    • Chrome 16
    • Firefox 11
    • Opera 12.10 / Opera Mobile 12.1
    • 任何带有 Flash 的浏览器都可以使用 web-socket-js shim 支持 WebSocket/polyfill.

      Any browser with Flash can support WebSocket using the web-socket-js shim/polyfill.

      请参阅 caniuse 了解桌面和移动浏览器中 WebSockets 支持的当前状态.

      See caniuse for the current status of WebSockets support in desktop and mobile browsers.

      查看 测试报告 来自 Autobahn WebSockets 用于功能/协议一致性测试.

      See the test reports from the WS testsuite included in Autobahn WebSockets for feature/protocol conformance tests.

      这取决于您使用的语言.

      It depends on which language you use.

      在 Java/Java EE 中:

      In Java/Java EE:

      • Jetty 7.0 supports it (very easy to use) V 7.5 supports RFC6455 - Jetty 9.1 supports javax.websocket / JSR 356)
      • GlassFish 3.0 (very low level and sometimes complex), Glassfish 3.1 has new refactored Websocket Support which is more developer friendly V 3.1.2 supports RFC6455
      • Caucho Resin 4.0.2 (not yet tried) V 4.0.25 supports RFC6455
      • Tomcat 7.0.27 now supports it V 7.0.28 supports RFC6455
      • Tomcat 8.x has native support for websockets RFC6455 and is JSR 356 compliant
      • JSR 356 included in Java EE 7 will define the Java API for WebSocket, but is not yet stable and complete. See Arun GUPTA's article WebSocket and Java EE 7 - Getting Ready for JSR 356 (TOTD #181) and QCon presentation (from 00:37:36 to 00:46:53) for more information on progress. You can also look at Java websocket SDK.

      其他一些 Java 实现:

      Some other Java implementations:

      在 C# 中:

      在 PHP 中:

      在 Python 中:

      In Python:

      • pywebsockets
      • websockify
      • gevent-websocket, gevent-socketio and flask-sockets based on the former
      • Autobahn
      • Tornado

      在 C:

      在 Node.js 中:

      In Node.js:

      • Socket.io :Socket.io 也有适用于 Python、Java、Google GO、Rack 的服务器端端口莉>
      • sockjs :sockjs 也有适用于 Python、Java、Erlang 和 Lua 的服务器端端口
      • WebSocket-Node - 纯 JavaScript 客户端 &HyBi-10 的服务器实现.
      • Socket.io : Socket.io also has serverside ports for Python, Java, Google GO, Rack
      • sockjs : sockjs also has serverside ports for Python, Java, Erlang and Lua
      • WebSocket-Node - Pure JavaScript Client & Server implementation of HyBi-10.

      Vert.x(也称为 Node.x) :在Java 7 JVM 和基于 Netty 的:

      Vert.x (also known as Node.x) : A node like polyglot implementation running on a Java 7 JVM and based on Netty with :

      • 支持 Ruby(JRuby)、Java、Groovy、Javascript(Rhino/Nashorn)、Scala、...
      • 真正的穿线.(与 Node.js 不同)
      • 立即理解多种网络协议,包括:TCP、SSL、UDP、HTTP、HTTPS、Websockets、SockJS 作为 WebSockets 的后备
      • Support for Ruby(JRuby), Java, Groovy, Javascript(Rhino/Nashorn), Scala, ...
      • True threading. (unlike Node.js)
      • Understands multiple network protocols out of the box including: TCP, SSL, UDP, HTTP, HTTPS, Websockets, SockJS as fallback for WebSockets

      Pusher.com 是一种可通过 REST API 访问的 Websocket 云服务.

      Pusher.com is a Websocket cloud service accessible through a REST API.

      DotCloud 云平台支持 Websockets、Java(Jetty Servlet Container)、NodeJS、Python、Ruby、PHP 和 Perl 编程语言.

      DotCloud cloud platform supports Websockets, and Java (Jetty Servlet Container), NodeJS, Python, Ruby, PHP and Perl programming languages.

      Openshift 云平台支持 websockets 和 Java (Jboss, Spring, Tomcat & Vertx), PHP (ZendServer & CodeIgniter), Ruby (ROR), Node.js, Python (Django & Flask) 平台.

      Openshift cloud platform supports websockets, and Java (Jboss, Spring, Tomcat & Vertx), PHP (ZendServer & CodeIgniter), Ruby (ROR), Node.js, Python (Django & Flask) plateforms.

      对于其他语言实现,请参阅维基百科文章以了解更多信息.

      Websockets 的 RFC:RFC6455

      The RFC for Websockets : RFC6455

      这篇关于哪些浏览器支持 HTML5 WebSocket API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆