<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://wiki.karljones.com/index.php?action=history&amp;feed=atom&amp;title=WebSocket</id>
		<title>WebSocket - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://wiki.karljones.com/index.php?action=history&amp;feed=atom&amp;title=WebSocket"/>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=WebSocket&amp;action=history"/>
		<updated>2026-10-23T17:09:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=13296&amp;oldid=prev</id>
		<title>Karl Jones: /* External links */</title>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=13296&amp;oldid=prev"/>
				<updated>2016-04-25T01:12:32Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;External links&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 01:12, 25 April 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 169:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 169:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.w3.org/TR/websockets/ The WebSocket API] - W3C [[W3C recommendation#Candidate Recommendation (CR)|Candidate Recommendation]] specification of the API&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.w3.org/TR/websockets/ The WebSocket API] - W3C [[W3C recommendation#Candidate Recommendation (CR)|Candidate Recommendation]] specification of the API&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.websocket.org/ WebSocket.org] WebSocket demos, loopback tests, general information and community&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* [http://www.websocket.org/ WebSocket.org] WebSocket demos, loopback tests, general information and community&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Web design and development]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Karl Jones</name></author>	</entry>

	<entry>
		<id>http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=7628&amp;oldid=prev</id>
		<title>Karl Jones at 10:17, 7 February 2016</title>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=7628&amp;oldid=prev"/>
				<updated>2016-02-07T10:17:25Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 10:17, 7 February 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''WebSocket''' is a protocol providing [[full-duplex]] communication channels over a single [[Transmission Control Protocol|TCP]] connection.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''WebSocket''' is a protocol providing [[full-duplex]] communication channels over a single [[Transmission Control Protocol|TCP]] connection.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(TO DO: &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;expand, organize, cross-reference, illustrate&lt;/del&gt;.)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(TO DO: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;fix templates&lt;/ins&gt;.)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Description ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Description ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Karl Jones</name></author>	</entry>

	<entry>
		<id>http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=5322&amp;oldid=prev</id>
		<title>Karl Jones: Created page with &quot;'''WebSocket''' is a protocol providing full-duplex communication channels over a single TCP connection.  (TO DO: expand, organize, cross...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.karljones.com/index.php?title=WebSocket&amp;diff=5322&amp;oldid=prev"/>
				<updated>2015-09-13T21:07:53Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;&amp;#039;&amp;#039;&amp;#039;WebSocket&amp;#039;&amp;#039;&amp;#039; is a protocol providing &lt;a href=&quot;/index.php?title=Full-duplex&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Full-duplex (page does not exist)&quot;&gt;full-duplex&lt;/a&gt; communication channels over a single &lt;a href=&quot;/index.php/Transmission_Control_Protocol&quot; title=&quot;Transmission Control Protocol&quot;&gt;TCP&lt;/a&gt; connection.  (TO DO: expand, organize, cross...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''WebSocket''' is a protocol providing [[full-duplex]] communication channels over a single [[Transmission Control Protocol|TCP]] connection.&lt;br /&gt;
&lt;br /&gt;
(TO DO: expand, organize, cross-reference, illustrate.)&lt;br /&gt;
&lt;br /&gt;
== Description ==&lt;br /&gt;
&lt;br /&gt;
The WebSocket protocol was standardized by the [[Internet Engineering Task Force|IETF]] as RFC 6455 in 2011, and the WebSocket [[application programming interface|API]] in [[Web IDL]] is being standardized by the [[World Wide Web Consortium|W3C]].&lt;br /&gt;
&lt;br /&gt;
WebSocket is designed to be implemented in [[web browser]]s and [[web server]]s, but it can be used by any client or server application. The WebSocket Protocol is an independent TCP-based protocol. Its only relationship to [[HTTP]] is that its [[Handshaking|handshake]] is interpreted by HTTP servers as an [[HTTP/1.1 Upgrade header|Upgrade request]].&lt;br /&gt;
&lt;br /&gt;
The WebSocket protocol makes more interaction between a browser and a website possible, facilitating live content and the creation of [[Real-time game|real-time games]].&lt;br /&gt;
&lt;br /&gt;
This is made possible by providing a standardized way for the server to send content to the browser without being solicited by the client, and allowing for messages to be passed back and forth while keeping the connection open.&lt;br /&gt;
&lt;br /&gt;
In this way a two-way (bi-directional) ongoing conversation can take place between a browser and the server. The communications are done over TCP [[Port (computer networking)|port]] number 80, which is of benefit for those environments which block non-web Internet connections using a [[Firewall (computing)|firewall]].&lt;br /&gt;
&lt;br /&gt;
Similar two-way browser-server communications have been achieved in non-standardized ways using stopgap technologies such as [[Comet (programming)|Comet]].&lt;br /&gt;
&lt;br /&gt;
The WebSocket protocol is currently supported in most major browsers including [[Google Chrome]], [[Internet Explorer]], [[Firefox]], [[Safari (web browser)|Safari]] and [[Opera web browser|Opera]]. WebSocket also requires web applications on the server to support it.&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
Unlike HTTP, WebSocket provides full-duplex communication.&amp;lt;ref&amp;gt;{{cite web|url=https://developer.mozilla.org/en-US/docs/Glossary/WebSockets|publisher= Mozilla Developer Network|date=2015|title=Glossary:WebSockets}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
Additionally, WebSocket enables streams of messages on top of TCP. TCP alone deals with streams of bytes with no inherent concept of a message. Before WebSocket, port 80 full-duplex communication was attainable using Comet channels; however, Comet implementation is nontrivial, and due to the TCP handshake and HTTP header overhead, it is inefficient for small messages. WebSocket protocol aims to solve these problems without compromising security assumptions of the web.&lt;br /&gt;
&lt;br /&gt;
The WebSocket protocol specification defines &amp;lt;code&amp;gt;ws&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;wss&amp;lt;/code&amp;gt; as two new [[uniform resource identifier]] (URI) schemes&amp;lt;ref&amp;gt;{{cite web|url=http://www.iana.org/assignments/uri-schemes.html |title=IANA Uniform Resource Identifer (URI) Schemes |publisher=[[Internet Assigned Numbers Authority]] |date=2011-11-14 |accessdate=2011-12-10|editor=Graham Klyne}}&amp;lt;/ref&amp;gt; that are used for unencrypted and encrypted connections, respectively. Apart from the scheme name and fragment (&amp;lt;code&amp;gt;#&amp;lt;/code&amp;gt; is not supported), the rest of the URI components are defined to use [[Path segment|URI generic syntax]].&amp;lt;ref&amp;gt;{{Cite IETF |title=RFC 6455 The WebSocket Protocol|publisher = [[Internet Engineering Task Force|IETF]] |section=3|sectionname=WebSocket URIs |rfc=6455|date=December 2011|author1=Ian Fette|author2=Alexey Melnikov}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Using the Google Chrome Developer Tools, developers can inspect the WebSocket handshake as well as the WebSocket frames.&amp;lt;ref&amp;gt;{{cite book |last1=Wang |first1=Vanessa |last2=Salim |first2=Frank |last3=Moskovits |first3=Peter |title=The Definitive Guide to HTML5 WebSocket |url=http://my.safaribooksonline.com/book/-/9781430247401/appendix-a-inspecting-websocket-traffic/sec1_xhtml |accessdate=7 April 2013 |date=February 2013 |publisher=Apress| isbn=978-1-4302-4740-1 |chapter=APPENDIX A: WebSocket Frame Inspection with Google Chrome Developer Tools }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Browser implementation ==&lt;br /&gt;
A secure version of the WebSocket protocol is implemented in Firefox 6,&amp;lt;ref&amp;gt;{{cite web | url=https://developer.mozilla.org/en/WebSockets | title=WebSocket enabled in Firefox 6 | author=Dirkjan Ochtman | date=May 27, 2011 | work=Mozilla.org | accessdate=2011-06-30 }}&amp;lt;/ref&amp;gt; Safari 6, Google Chrome 14,&amp;lt;ref&amp;gt;{{cite web | url=http://www.chromium.org/developers/web-platform-status | title=Chromium Web Platform Status | accessdate=2011-08-03 }}&amp;lt;/ref&amp;gt; [[Opera (web browser)|Opera]] 12.10 and [[Internet Explorer]] 10.&amp;lt;ref&amp;gt;{{cite web|url=http://msdn.microsoft.com/en-us/library/ie/hh673567(v=vs.85).aspx |title=WebSockets (Windows) |publisher=Microsoft |date=2012-09-28 |accessdate=2012-11-07}}&amp;lt;/ref&amp;gt;  A detailed protocol test suite report&amp;lt;ref name=&amp;quot;autobahn&amp;quot;&amp;gt;{{cite web|url=http://autobahn.ws/testsuite/reports/clients/index.html |title=WebSockets Protocol Test Report |publisher=Tavendo.de |date=2011-10-27 |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt; lists the conformance of those browsers to specific protocol aspects.&lt;br /&gt;
&lt;br /&gt;
An older, less secure version of the protocol was implemented in Opera 11 and [[Safari (web browser)|Safari]] 5, as well as the mobile version of Safari in [[iOS 4.2]].&amp;lt;ref&amp;gt;{{cite web | url=http://www.appleinsider.com/articles/10/11/23/apple_adds_accelerometer_websockets_support_to_safari_in_ios_4_2.html | title=Apple adds accelerometer, WebSockets support to Safari in iOS 4.2 | author=Katie Marsal | date=November 23, 2010 | work=AppleInsider.com | accessdate=2011-05-09 }}&amp;lt;/ref&amp;gt; The BlackBerry Browser in OS7 implements WebSockets.&amp;lt;ref&amp;gt;{{cite web|title=Web Sockets API|url=http://docs.blackberry.com/en/developers/deliverables/29271/Web_Sockets_support_1582781_11.jsp|publisher=[[BlackBerry Limited|BlackBerry]]|accessdate=8 July 2011}}&amp;lt;/ref&amp;gt; Because of vulnerabilities, it was disabled in Firefox 4 and 5,&amp;lt;ref&amp;gt;{{cite web | url=http://hacks.mozilla.org/2010/12/websockets-disabled-in-firefox-4/ | title=WebSocket disabled in Firefox 4 | author=Chris Heilmann | date=December 8, 2010 | work=Hacks.Mozilla.org | accessdate=2011-05-09 }}&amp;lt;/ref&amp;gt; and Opera 11.&amp;lt;ref&amp;gt;{{cite web | url=http://my.opera.com/chooseopera/blog/2010/12/10/regarding-websocket | title=Regarding WebSocket | author=Aleksander Aas | date=December 10, 2010 | work=My Opera Blog | accessdate=2011-05-09 |archiveurl=http://web.archive.org/web/20101215010748/http://my.opera.com/chooseopera/blog/2010/12/10/regarding-websocket|archivedate=2010-12-15}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a command-line switch &amp;lt;code&amp;gt;--enable-websocket-over-spdy&amp;lt;/code&amp;gt; for Google Chrome that enables an early experimental implementation of WebSocket over [[SPDY]].&amp;lt;ref&amp;gt;{{cite web|url=http://peter.sh/experiments/chromium-command-line-switches/ |title=List of Chromium Command Line Switches |website=peter.sh |author=Peter Beverloo|date= |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Implementation status&lt;br /&gt;
! Protocol&lt;br /&gt;
! Draft date&lt;br /&gt;
! Internet Explorer&lt;br /&gt;
! Firefox&amp;lt;ref&amp;gt;{{cite web|url=https://developer.mozilla.org/en/WebSockets |title=WebSockets (support in Firefox) |publisher=Mozilla Foundation|website=developer.mozilla.org |date=2011-09-30 |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt; (PC)&lt;br /&gt;
! Firefox (Android)&lt;br /&gt;
! Chrome (PC, Mobile)&lt;br /&gt;
! Safari (Mac, iOS)&lt;br /&gt;
! Opera (PC, Mobile)&lt;br /&gt;
! Android Browser&lt;br /&gt;
|-&lt;br /&gt;
! [http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-75 hixie-75]&lt;br /&gt;
| February 4, 2010&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
| 4&lt;br /&gt;
| 5.0.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! [http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 hixie-76]&amp;lt;br/&amp;gt;[http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-00 hybi-00]&lt;br /&gt;
| May 6, 2010&amp;lt;br/&amp;gt;May 23, 2010&lt;br /&gt;
|&lt;br /&gt;
| 4.0 (disabled)&lt;br /&gt;
|&lt;br /&gt;
| 6&lt;br /&gt;
| 5.0.1&lt;br /&gt;
| 11.00 (disabled)&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! 7 [http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07 hybi-07]&lt;br /&gt;
| April 22, 2011&lt;br /&gt;
|&lt;br /&gt;
| 6&amp;lt;ref&amp;gt;{{cite web|url=https://bugzilla.mozilla.org/show_bug.cgi?id=640003 |title=Bug 640003 - WebSockets - upgrade to ietf-06 |publisher=Mozilla Foundation |date=2011-03-08 |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt;{{Efn|name=&amp;quot;mozwebsocket&amp;quot;|Gecko-based browsers versions 6–10 implement the WebSocket object as &amp;quot;MozWebSocket&amp;quot;,&amp;lt;ref&amp;gt;{{cite web|url=https://developer.mozilla.org/en/WebSockets |title=WebSockets - MDN |website=developer.mozilla.org |publisher=Mozilla Foundation |date=2011-09-30 |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt; requiring extra code to integrate with existing WebSocket-enabled code.}}&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! 8 [http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-10 hybi-10]&lt;br /&gt;
| July 11, 2011&lt;br /&gt;
|&lt;br /&gt;
| 7&amp;lt;ref&amp;gt;{{cite web|url=https://bugzilla.mozilla.org/show_bug.cgi?id=640003#c91 |title=Bug 640003 - WebSockets - upgrade to ietf-07(comment 91)|publisher=Mozilla Foundation|date=2011-07-22}}&amp;lt;/ref&amp;gt;{{Efn|name=&amp;quot;mozwebsocket&amp;quot;}}&lt;br /&gt;
| 7&lt;br /&gt;
| 14&amp;lt;ref&amp;gt;{{cite web|url=https://code.google.com/p/chromium/issues/detail?id=64470 |title=Chromium bug 64470 |website=code.google.com |publisher=Google|date=2010-11-25 |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
! 13 RFC 6455&lt;br /&gt;
| December, 2011&lt;br /&gt;
| 10&amp;lt;ref&amp;gt;{{cite web|url=http://blogs.msdn.com/b/ie/archive/2012/03/19/websockets-in-windows-consumer-preview.aspx |title=WebSockets in Windows Consumer Preview |publisher=Microsoft|work=IE Engineering Team |date=2012-03-19 |accessdate=2012-07-23}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 11&lt;br /&gt;
| 11&lt;br /&gt;
| 16&amp;lt;ref&amp;gt;{{cite web|url=http://trac.webkit.org/changeset/97249 |title=WebKit Changeset 97247: WebSocket: Update WebSocket protocol to hybi-17 |website=trac.webkit.org |date= |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 6&lt;br /&gt;
| 12.10&amp;lt;ref&amp;gt;{{cite web|url=http://my.opera.com/ODIN/blog/2012/08/03/a-hot-opera-12-50-summer-time-snapshot |title=A hot Opera 12.50 summer-time snapshot |publisher=Opera Developer News |date=2012-08-03 |accessdate=2012-08-03|archiveurl=http://web.archive.org/web/20120805234006/http://my.opera.com/ODIN/blog/2012/08/03/a-hot-opera-12-50-summer-time-snapshot|archivedate=2012-08-05}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
| 4.4&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Protocol handshake ==&lt;br /&gt;
&lt;br /&gt;
To establish a WebSocket connection, the client sends a WebSocket handshake request, for which the server returns a WebSocket handshake response, as shown in the example below.&lt;br /&gt;
&lt;br /&gt;
Client request (just like in [[HTTP]], each line ends with &amp;lt;code&amp;gt;[[\r\n]]&amp;lt;/code&amp;gt; and there must be an extra blank line at the end):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
GET /chat HTTP/1.1&lt;br /&gt;
Host: server.example.com&lt;br /&gt;
Upgrade: websocket&lt;br /&gt;
Connection: Upgrade&lt;br /&gt;
Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==&lt;br /&gt;
Sec-WebSocket-Protocol: chat, superchat&lt;br /&gt;
Sec-WebSocket-Version: 13&lt;br /&gt;
Origin: http://example.com&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Server response:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
HTTP/1.1 101 Switching Protocols&lt;br /&gt;
Upgrade: websocket&lt;br /&gt;
Connection: Upgrade&lt;br /&gt;
Sec-WebSocket-Accept: HSmrc0sMlYUkAGmm5OPpG2HaGWk=&lt;br /&gt;
Sec-WebSocket-Protocol: chat&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The handshake resembles HTTP so that servers can handle HTTP connections as well as WebSocket connections on the same port. Once the connection is established, communication switches to a bidirectional binary protocol that does not conform to the HTTP protocol.&lt;br /&gt;
&lt;br /&gt;
In addition to &amp;lt;code&amp;gt;Upgrade&amp;lt;/code&amp;gt; headers, the client sends a &amp;lt;code&amp;gt;Sec-WebSocket-Key&amp;lt;/code&amp;gt; header containing [[base64]]-encoded random bytes, and the server replies with a [[hash function|hash]] of the key in the &amp;lt;code&amp;gt;Sec-WebSocket-Accept&amp;lt;/code&amp;gt; header. This is intended to prevent a [[Cache (computing)|caching]] [[HTTP proxy|proxy]] from re-sending a previous WebSocket conversation, and does not provide any authentication, privacy or integrity.&lt;br /&gt;
&lt;br /&gt;
The hashing function appends the fixed string &amp;lt;code&amp;gt;258EAFA5-E914-47DA-95CA-C5AB0DC85B11&amp;lt;/code&amp;gt; (a [[GUID]]) to the value from &amp;lt;code&amp;gt;Sec-WebSocket-Key&amp;lt;/code&amp;gt; header (which is not decoded from base64), applies the [[SHA-1]] hashing function, and encodes the result using base64.&lt;br /&gt;
&lt;br /&gt;
Once the connection is established, the client and server can send WebSocket data or text frames back and forth in [[Duplex (telecommunications)|full-duplex]] mode. The data is minimally framed, with a small header followed by payload. WebSocket transmissions are described as &amp;quot;messages&amp;quot;, where a single message can optionally be split across several data frames. This can allow for sending of messages where initial data is available but the complete length of the message is unknown (it sends one data frame after another until the end is reached and marked with the FIN bit). With extensions to the protocol, this can also be used for multiplexing several streams simultaneously (for instance to avoid monopolizing use of a socket for a single large payload).&lt;br /&gt;
&lt;br /&gt;
It is important (from a security perspective) to validate the &amp;quot;Origin&amp;quot; header during the connection establishment process on the serverside (against the expected origins) to avoid Cross-Site WebSocket Hijacking attacks, which might be possible when the connection is authenticated with Cookies or HTTP authentication. It is better to use tokens or similar protection mechanisms to authenticate the WebSocket connection when sensitive (private) data is being transferred over the WebSocket.&amp;lt;ref&amp;gt;{{cite web|url=http://www.christian-schneider.net/CrossSiteWebSocketHijacking.html#main| title=Cross-Site WebSocket Hijacking (CSWSH)|author=Christian Schneider|work=Web Application Security Blog|date= August 31, 2013}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Proxy traversal ==&lt;br /&gt;
&lt;br /&gt;
WebSocket protocol client implementations try to detect if the [[user agent]] is configured to use a proxy when connecting to destination host and port and, if it is, uses [[HTTP tunnel#HTTP CONNECT tunneling|HTTP CONNECT]] method to set up a persistent tunnel.&lt;br /&gt;
&lt;br /&gt;
While the WebSocket protocol itself is unaware of proxy servers and firewalls, it features an HTTP-compatible handshake so that HTTP servers can share their default HTTP and HTTPS ports (80 and 443) with a WebSocket gateway or server. The WebSocket protocol defines a ws:// and wss:// prefix to indicate a WebSocket and a WebSocket Secure connection, respectively. Both schemes use an [[HTTP/1.1 Upgrade header|HTTP upgrade mechanism]] to upgrade to the WebSocket protocol. Some proxy servers are transparent and work fine with WebSocket; others will prevent WebSocket from working correctly, causing the connection to fail. In some cases, additional proxy server configuration may be required, and certain proxy servers may need to be upgraded to support WebSocket.&lt;br /&gt;
&lt;br /&gt;
If unencrypted WebSocket traffic flows through an explicit or a transparent proxy server on its way to the WebSocket server, then, whether or not the proxy server behaves as it should, the connection is almost certainly bound to fail today (as WebSocket becomes more mainstream, proxy servers may become WebSocket aware). Therefore, unencrypted WebSocket connections should be used only in the simplest topologies.&amp;lt;ref&amp;gt;{{cite web |url=http://www.infoq.com/articles/Web-Sockets-Proxy-Servers |title=How Web Sockets Interact With Proxy Servers |website=Infoq.com |date= March 16, 2010 |publisher=C4Media Inc. |author=Peter Lubbers |accessdate=2011-12-10}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If an encrypted WebSocket connection is used, then the use of [[Transport Layer Security]] (TLS) in the WebSocket Secure connection ensures that an HTTP CONNECT command is issued when the browser is configured to use an explicit proxy server. This sets up a tunnel, which provides low-level end-to-end TCP communication through the HTTP proxy, between the WebSocket Secure client and the WebSocket server. In the case of transparent proxy servers, the browser is unaware of the proxy server, so no HTTP CONNECT is sent. However, since the wire traffic is encrypted, intermediate transparent proxy servers may simply allow the encrypted traffic through, so there is a much better chance that the WebSocket connection will succeed if WebSocket Secure is used. Using encryption is not free of resource cost, but often provides the highest success rate since it would be travelling through a secure tunnel.&lt;br /&gt;
&lt;br /&gt;
A mid-2010 draft(version hixie-76) broke compatibility with reverse-proxies and gateways by including 8 bytes of key data after the headers, but not advertising that data in a &amp;lt;code&amp;gt;Content-Length: 8&amp;lt;/code&amp;gt; header.&lt;br /&gt;
&lt;br /&gt;
This data was not forwarded by all intermediates, which could lead to protocol failure. More recent drafts (e.g., hybi-09) put the key data in a &amp;lt;code&amp;gt;Sec-WebSocket-Key&amp;lt;/code&amp;gt; header, solving this problem.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[BOSH]]&lt;br /&gt;
* [[Comparison of WebSocket implementations]]&lt;br /&gt;
* [[HTTP/2]]&lt;br /&gt;
* [[Network socket]]&lt;br /&gt;
* [[Push technology]]&lt;br /&gt;
* [[Server-sent events]]&lt;br /&gt;
* [[Web application]]&lt;br /&gt;
* [[XMLHttpRequest]]&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
* [https://en.wikipedia.org/wiki/WebSocket WebSocket] @ Wikipedia&lt;br /&gt;
* [https://datatracker.ietf.org/wg/hybi/charter/ IETF Hypertext-Bidirectional (HyBi) working group]&lt;br /&gt;
** [http://tools.ietf.org/html/rfc6455 The WebSocket protocol] - Proposed Standard published by the IETF HyBi Working Group&lt;br /&gt;
** [http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol The WebSocket protocol] - Internet-Draft published by the IETF HyBi Working Group&lt;br /&gt;
** [http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-76 The WebSocket protocol] - Original protocol proposal by Ian Hickson&lt;br /&gt;
* [http://dev.w3.org/html5/websockets/ The WebSocket API] - W3C [[W3C recommendation#Working Draft (WD)|Working Draft]] specification of the API&lt;br /&gt;
* [http://www.w3.org/TR/websockets/ The WebSocket API] - W3C [[W3C recommendation#Candidate Recommendation (CR)|Candidate Recommendation]] specification of the API&lt;br /&gt;
* [http://www.websocket.org/ WebSocket.org] WebSocket demos, loopback tests, general information and community&lt;/div&gt;</summary>
		<author><name>Karl Jones</name></author>	</entry>

	</feed>