---
title: "What is WebSocket?"
term: "WebSocket"
description: "WebSocket is a protocol that opens a persistent, two-way connection between a browser or other client and a server over a single TCP connection, so both sides can send messages at any time with little overhead."
url: "https://glossary.io/websocket/"
published: "2026-11-22T20:47:28.789Z"
updated: "2026-11-22T20:47:28.789Z"
topics:
  - "Web development"
  - "Web standards and protocols"
wikidata: "https://www.wikidata.org/wiki/Q859938"
---

# What is WebSocket?

**Definition:** WebSocket is a protocol that opens a persistent, two-way connection between a browser or other client and a server over a single TCP connection, so both sides can send messages at any time with little overhead.

The protocol was standardized by the [IETF](https://glossary.io/ietf/) as RFC 6455 in 2011, and the browser WebSocket API is maintained as a living standard by the [WHATWG](https://glossary.io/whatwg/). A connection starts as an ordinary HTTP request that asks to upgrade to WebSocket, so it works over the usual ports 80 and 443 and through most proxies. Secure connections use the wss scheme, which runs over TLS.

WebSockets power real-time features such as chat, live notifications, collaborative editing, multiplayer games and live dashboards, where repeatedly polling a server would be slow and wasteful. For one-way updates from server to browser, server-sent events are a simpler alternative. Many hosting platforms support WebSockets, including [Cloudflare Workers](https://glossary.io/cloudflare-workers/) with Durable Objects.

## WebSocket resources

- [Official website](https://websockets.spec.whatwg.org/)
- [WebSocket on Wikipedia](https://en.wikipedia.org/wiki/WebSocket)

## Related terms

- [Cloudflare Workers](https://glossary.io/cloudflare-workers/)
- [IETF](https://glossary.io/ietf/)
- [WHATWG](https://glossary.io/whatwg/)

**Topics:** [Web development](https://glossary.io/topics/web-development/), [Web standards and protocols](https://glossary.io/topics/web-standards/)

## Cite this definition

- APA: What is WebSocket? (2026, November 22). Glossary. https://glossary.io/websocket/
- MLA: “What Is WebSocket?” Glossary, Coywolf, 22 Nov. 2026, glossary.io/websocket/.
- Chicago: “What Is WebSocket?” Glossary. Coywolf. November 22, 2026. https://glossary.io/websocket/.

Published November 22, 2026.
