Tech Tree of the Web

The history of web technology, 1945 to now: 112 ideas and the lines between them. Drag, scroll or press ← → to travel. Open any one for its story.

No. 090 / 112Seen 0 / 112Colophon

The Platform

WebSockets, 2011. Era V, The Platform.

Era V · 2008–2016

← drag · scroll · arrow keys →

2011101GET /chat HTTP/1.1Upgrade: websocketConnection: UpgradeSec-WebSocket-Version: 13 HTTP/1.1 101 Switching Protocols

The opening handshake: an HTTP request asks to switch, and the connection stays open both ways. Typeset for this timeline: no licence-clean photograph of the thing itself was found.

Key details

When
2011 (RFC 6455, December)
Who
Ian Fette (Google) and Alexey Melnikov (Isode); name coined by Ian Hickson and Michael Carter
Where
IETF
Answered
It replaced two-way workarounds such as long polling and multiple HTTP connections with one persistent connection.
Led to
It gave browsers a standard full-duplex channel for chat, games and live updates, served on the same ports as HTTP.

No. 090 · 2011 · Network · Era V, The Platform

WebSockets

Kept a two-way connection open between page and server, so chat and live updates stopped needing polling.

Facts

  1. WebSocket was first referenced as TCPConnection in the HTML5 specification, a placeholder for a TCP-based socket API. 2
  2. Ian Hickson and Michael Carter coined the name WebSocket after discussions on the #whatwg IRC channel in June 2008. 2
  3. Google Chrome 4 was the first browser to ship full support, in December 2009. 2
  4. RFC 6455, by Ian Fette and Alexey Melnikov, was published in December 2011 as a Proposed Standard. 1
  5. The connection opens with an HTTP Upgrade request, and the ws and wss schemes default to ports 80 and 443. 1

Quirks

  • Servers prove they read the handshake by appending a fixed GUID, 258EAFA5-E914-47DA-95CA-C5AB0DC85B11, to the client's key and hashing it. 1
  • Clients must mask every frame they send so that confused intermediaries do not misread the traffic, even over TLS. 1

Sources

  1. RFC 6455, The WebSocket Protocol
  2. Wikipedia, WebSocket
Came from
Led to
Nothing on this tree yet