Changes to WebSocket
TechWritereditor · 5 Dec 2026, 01:28 · “New page”
+ added − removed (first version)
Title
Removed:
Added: WebSocket
Short description
Removed:
Added: Protocol for two-way web connections (RFC 6455)
Type
Removed:
Added: technology
Summary
Removed:
Added: WebSocket is a communications protocol that keeps a single connection open between a client, such as a web browser, and a server so that both sides can send messages at any time. It was standardised by the IETF as RFC 6455 in December 2011.
Fact box
Removed:
Added: Type: Network communications protocol
Added: Standard: RFC 6455 (IETF)
Added: Published: December 2011
Added: Authors: I. Fette (Google), A. Melnikov (Isode)
Added: Runs over: TCP
Added: URI schemes: ws:// (port 80), wss:// (port 443)
Article
Added: **WebSocket** is a network protocol that lets a client, usually a [[Web browser]], and a server hold a long-lived, two-way conversation over a single connection. It was published by the [[Internet Engineering Task Force]] as RFC 6455 in December 2011, written by I. Fette of Google and A. Melnikov of Isode.[^1] Its stated aim is to give browser-based applications two-way communication without opening many separate [[Hypertext Transfer Protocol]] connections, as older techniques such as long polling did.[^1]
Added: ## How it works
Added:
Added: A WebSocket connection begins as an ordinary HTTP request asking the server to "upgrade" the connection. The client sends a random key; the server combines it with a fixed value, hashes the result and sends it back, proving that it really understood the WebSocket request. A reply with status code 101 means the switch has succeeded.[^1] From then on, the two sides exchange messages over the same [[TCP/IP]] connection, split into small frames that carry text, binary data or control signals such as ping, pong and close. Frames sent by the client must be scrambled ("masked") with a random key, a rule intended to protect proxies and other equipment along the route. Either side can end the session with a closing handshake.[^1]
Added:
Added: Addresses use the `ws://` scheme, on port 80 by default, or `wss://` for connections protected by [[Transport Layer Security]], on port 443.[^1]
Added:
Added: ## In web browsers
Added:
Added: Web pages use the protocol through the WebSocket programming interface in [[JavaScript]]. It lets a page send messages to a server and receive replies without repeatedly polling the server for updates.[^2] MDN describes the interface as available across browsers since July 2015, but notes that it does not support backpressure, so a flood of incoming messages can overwhelm a page; it points to the newer WebTransport interface for such cases.[^2] The browser interface itself is defined by the WHATWG WebSockets Standard, a living standard created in 2021 from text moved out of the HTML and Fetch standards, which builds on RFC 6455 rather than replacing it.[^3]
Added:
Added: ## See also
Added: - [[Hypertext Transfer Protocol]]
Added: - [[WebRTC]]
Added: - [[Transport Layer Security]]
Added: - [[TCP/IP]]
Sources
Removed:
Added: RFC 6455: The WebSocket Protocol | https://datatracker.ietf.org/doc/html/rfc6455 | Internet Engineering Task Force | 2011-12-01
Added: The WebSocket API (WebSockets) | https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API | MDN Web Docs (Mozilla)
Added: WebSockets Standard | https://websockets.spec.whatwg.org/ | WHATWG | 2026-11-12
Categories
Removed:
Added: Internet
Added: Computer networks
Other names
Removed:
Added: WebSocket Protocol
Added: WebSockets
Added: RFC 6455