---
title: "WebSocket RFC 6455: the protocol for real-time web"
description: "WebSocket RFC 6455 (December 2011): IETF standard protocol for browser-server full-duplex communication over TCP. HTTP handshake, binary framing, universal browser support since 2012. Foundation of web chat, trading, gaming."
url: "https://www.noze.it/en/insights/websocket-rfc-6455/"
lang: "en"
alternate: "https://www.noze.it/insights/websocket-rfc-6455/"
published: "2012-01-20"
author: "noze S.r.l."
keywords: "Open Source, Web, WebSocket, RFC 6455, IETF, Real-time, HTTP"
---

# WebSocket RFC 6455: the protocol for real-time web

WebSocket RFC 6455 (December 2011): IETF standard protocol for browser-server full-duplex communication over TCP. HTTP handshake, binary framing, universal browser support since 2012. Foundation of web chat, trading, gaming.

20 January 2012

## The limit of polling

Before WebSocket, “real-time” communication between browser and server is achieved with workarounds:

- **Short polling** — client repeats HTTP requests every N seconds
- **Long polling** — HTTP request held open until event
- **Comet** — HTTP streaming techniques
- **Server-Sent Events** (2006-2009) — unidirectional server→client

None is efficient for **bidirectional** low-latency communication (chat, trading, gaming, live dashboard).

## The release

**RFC 6455** is published by the **IETF** in **December 2011**. Main authors: **Ian Fette** (Google), **Alexey Melnikov**. The protocol had been introduced in draft in 2008 by **Ian Hickson** (HTML5 spec) and **Michael Carter**.

The final draft is worked on by a working group including browser vendors, Apache Foundation, other implementers.

## How it works

1. **HTTP Upgrade handshake** — client sends `GET` with `Upgrade: websocket` header
2. **Server responds** `101 Switching Protocols`
3. **Persistent TCP connection** — after handshake, binary WebSocket frames
4. **Framing** — text/binary/close/ping/pong frames with client→server masking
5. **URI scheme** — `ws://` (plaintext) or `wss://` (TLS)

```
const ws = new WebSocket('wss://api.example.com/stream');
ws.onmessage = (e) => console.log(e.data);
ws.send(JSON.stringify({ action: 'subscribe' }));
```

## Browser adoption

- **Chrome 14** (September 2011) — final support
- **Firefox** — support expected in the 2012 releases
- **Safari** — on the WebKit roadmap

Universal availability is expected by the second half of 2012 as these browsers ship.

## Libraries and frameworks

The protocol is rapidly adopted:

- **Socket.IO** (2010, fallback for legacy browsers)
- **ws** — Node.js library, faster
- **Phoenix Channels** (Elixir)
- **SignalR** (.NET)
- **Django Channels** (Python)
- **ActionCable** (Rails 5)
- **Spring WebSocket** (Java)

## Use cases

- **Chat** — Slack, Discord, WhatsApp Web
- **Trading** — real-time orderbook, live prices
- **Gaming** — online multiplayer
- **Collaboration** — Google Docs, Figma, Notion
- **Live dashboard** — monitoring, observability
- **IoT** — telemetry, remote control
- **Push notifications** — web apps

## In the Italian context

WebSocket is positioning itself as the foundation for Italian real-time applications: fintech and online trading, health monitoring, SaaS collaboration and online gaming are starting to design architectures around a persistent bidirectional channel.

Update — 2024

Browser support completes through 2012: **Firefox 11** (March 2012), **IE 10** (September 2012), **Safari 6** (July 2012), **Opera 12.1** (November 2012). From **2013** WebSocket is universally available. Subsequent extensions: **RFC 7692** (permessage-deflate compression, 2015), **RFC 8441** (WebSocket over HTTP/2, 2018), **RFC 9220** (WebSocket over HTTP/3, 2022). **WebTransport** (2021+) over QUIC/HTTP/3 proposes an evolution for UDP-like datagrams in browsers, but WebSocket remains the dominant standard.

---

_References: RFC 6455 (December 2011). IETF. Ian Fette (Google), Alexey Melnikov. ws\://, wss\:// schemes._
