# WebSocket Handshake

*noun*

say it: **“WEB-sah-kit HAND-shayk”** **/ˈwɛbˌsɑkɪt ˈhændˌʃeɪk/**

The opening exchange in which a browser asks a server over HTTP to switch to a WebSocket and the server agrees.

## What is the **WebSocket handshake**?

The **WebSocket handshake** is how a WebSocket starts: an ordinary HTTP request with an `Upgrade: websocket` header asks to switch, and the server's `101 Switching Protocols` answer turns that connection into a WebSocket.

```text
GET /scores HTTP/1.1
Host: localhost:8080
Upgrade: websocket
Connection: Upgrade

HTTP/1.1 101 Switching Protocols
```

## In a sentence

- “A proxy that drops the Upgrade header breaks the **WebSocket handshake**.”
- “In the Network tab, the **WebSocket handshake** shows as one request answered with 101.”

Level: Freelancer · [More Web Development terms at this level](https://www.ask-codey.com/glossary?category=web-development&level=4)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/websocket-handshake
