WebSockets

  • Revision slug: WebSockets
  • Revision title: WebSockets
  • Revision id: 791
  • Created:
  • Creator: Sheppy
  • Is current revision? No
  • Comment move most of the heading stuff that's Gecko-specific into browser compat sectino; 120 words added, 142 words removed

Revision Content

{{ gecko_minversion_header("2.0") }}

WebSockets is a technology that makes it possible to open an interactive communication session between the user's browser and a server.

Enabling WebSockets

If you wish to experiment with WebSockets, you may do so by opening about:config and setting the network.websocket.enabled preference to true. You will also need to set the network.websocket.override-security-block preference to true in order to allow initializing a WebSocket connection.

Documentation

Introduction to WebSockets
A brief introduction to WebSockets, explaining what it is and what it's useful for.
WebSockets reference
A reference to the client-side WebSocket API.
Writing WebSocket client applications
A tutorial guide to writing WebSocket clients to run in the browser.
The WebSocket protocol
A reference to the WebSocket protocol.
Writing WebSocket servers
A guide to writing server-side code to handle the WebSocket protocol.

View All...

Tools


Related Topics

AJAXJavaScript

See also

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Version -76 support {{ obsolete_inline() }} {{ CompatUnknown() }} {{ CompatGeckoDesktop("2.0") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Version -07 support {{ CompatUnknown() }} {{ CompatGeckoDesktop("6.0") }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Version -76 support {{ obsolete_inline() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}
Version -07 support {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }} {{ CompatUnknown() }}

Gecko notes

WebSockets support in Firefox 6 has been upgraded to a newer version of the protocol compared to the version available in Firefox 4 and 5. Firefox 6 implements what's known as version 07 of the WebSockets RFC (implemented in bug 640003). The new version is backwards incompatible, so it might not work with server implementations based on the old protocol.

Warning: Among other things, a key reason WebSockets is currently disabled by default in Firefox 4 and 5 is the discovery of a security issue in the protocol's design. Using WebSockets in those versions of Firefox in a production environment is not recommended at this time.

{{ languages ( {"es": "es/WebSockets"} ) }}

Revision Source

<p>{{ gecko_minversion_header("2.0") }}</p>
<p>WebSockets is a technology that makes it possible to open an interactive communication session between the user's browser and a server.</p>
<h2>Enabling WebSockets</h2>
<p>If you wish to experiment with WebSockets, you may do so by opening <code>about:config</code> and setting the <code>network.websocket.enabled</code> preference to <code>true</code>. You will also need to set the <code>network.websocket.override-security-block</code> preference to <code>true</code> in order to allow initializing a WebSocket connection.</p>
<table class="topicpage-table"> <tbody> <tr> <td> <h4 name="Documentation"><a href="/Special:Tags?tag=WebSockets&amp;language=en" title="Special:Tags?tag=WebSockets&amp;language=en">Documentation</a></h4> <dl> <dt><a href="/en/WebSockets/Introduction_to_WebSockets" title="en/WebSockets/Introduction to WebSockets">Introduction to WebSockets</a></dt> <dd>A brief introduction to WebSockets, explaining what it is and what it's useful for.</dd> <dt><a href="/en/WebSockets/WebSockets_reference" title="en/WebSockets/WebSockets reference">WebSockets reference</a></dt> <dd>A reference to the client-side WebSocket API.</dd> <dt><a href="/en/WebSockets/Writing_WebSocket_client_applications" title="en/WebSockets/Writing WebSocket client applications">Writing WebSocket client applications</a></dt> <dd>A tutorial guide to writing WebSocket clients to run in the browser.</dd> <dt><a href="/en/WebSockets/The_WebSocket_protocol" title="en/WebSockets/The WebSocket protocol">The WebSocket protocol</a></dt> <dd>A reference to the WebSocket protocol.</dd> <dt><a href="/en/WebSockets/Writing_WebSocket_servers" title="en/WebSockets/Writing WebSocket servers">Writing WebSocket servers</a></dt> <dd>A guide to writing server-side code to handle the WebSocket protocol.</dd> </dl> <p><span class="alllinks"><a href="/Special:Tags?tag=WebSockets&amp;language=en" title="Special:Tags?tag=WebSockets&amp;language=en">View All...</a></span></p> </td> <td> <h4 name="Tools">Tools</h4> <ul> <li><a class=" link-https" href="https://github.com/Worlize/WebSocket-Node" title="https://github.com/Worlize/WebSocket-Node">WebSocket-Node</a>: A WebSocket implementation for <a class=" external" href="http://nodejs.org" title="http://nodejs.org/">Node.js</a>.</li> </ul> <p><span class="alllinks"><br> </span></p> <h4 name="Related_Topics">Related Topics</h4> <dl> <dd><a href="/en/AJAX" title="en/AJAX">AJAX</a>, <a href="/en/JavaScript" title="en/JavaScript">JavaScript</a></dd> </dl> </td> </tr> </tbody>
</table>
<h2>See also</h2>
<ul> <li><a class=" external" href="http://dev.w3.org/html5/websockets/" title="http://dev.w3.org/html5/websockets/">WebSocket API Specification</a></li>
</ul>
<h2>Browser compatibility</h2>
<p>{{ CompatibilityTable() }}</p>
<div id="compat-desktop">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Chrome</th> <th>Firefox (Gecko)</th> <th>Internet Explorer</th> <th>Opera</th> <th>Safari</th> </tr> <tr> <td>Version -76 support {{ obsolete_inline() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatGeckoDesktop("2.0") }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> <tr> <td>Version -07 support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatGeckoDesktop("6.0") }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table"> <tbody> <tr> <th>Feature</th> <th>Android</th> <th>Firefox Mobile (Gecko)</th> <th>IE Mobile</th> <th>Opera Mobile</th> <th>Safari Mobile</th> </tr> <tr> <td>Version -76 support {{ obsolete_inline() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> <tr> <td>Version -07 support</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> <td>{{ CompatUnknown() }}</td> </tr> </tbody>
</table>
</div>
<h3>Gecko notes</h3>
<p>WebSockets support in Firefox 6 has been upgraded to a newer version of the protocol compared to the version available in Firefox 4 and 5. Firefox 6 implements what's known as version 07 of the WebSockets RFC (implemented in <a class=" link-https" href="https://bugzilla.mozilla.org/640003" title="https://bugzilla.mozilla.org/640003">bug 640003</a>). The new version is backwards incompatible, so it might not work with server implementations based on the old protocol.</p>
<div class="warning"><strong>Warning:</strong> Among other things, a key reason WebSockets is currently disabled by default in Firefox 4 and 5 is the discovery of a <a class=" external" href="http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html" title="http://www.ietf.org/mail-archive/web/hybi/current/msg04744.html">security issue in the protocol's design</a>. Using WebSockets in those versions of Firefox in a production environment is not recommended at this time.</div>
<p>{{ languages ( {"es": "es/WebSockets"} ) }}</p>
Revert to this revision