WebSocket
WebSocket is a protocol that opens a persistent, two-way connection between a browser and a server. Unlike normal HTTP requests, it lets data flow in both directions continuously without re-connecting each time.
Definition
WebSocket is a full-duplex communication protocol that runs over a single, long-lived TCP connection. It begins life as an ordinary HTTP request that is then "upgraded" via the Upgrade: websocket header, after which both client and server can push messages to each other at any time.
How WebSocket works
After the initial HTTP handshake, the connection switches to the ws:// or secure wss:// scheme. The socket stays open, so the server can stream live data (chat messages, stock prices, sports scores) instantly instead of the client repeatedly polling.
Why it matters for scraping and proxies
- Many modern sites load dynamic data over WebSocket rather than REST, so scrapers must capture
wss://traffic directly. - Persistent connections complicate IP rotation because switching IPs mid-session drops the socket.
- SOCKS5 proxies tunnel WebSocket traffic more reliably than basic HTTP proxies.
Understanding WebSocket is essential when scraping real-time dashboards, trading platforms, or live odds feeds where data never appears in the initial HTML.
Examples
Live chat apps streaming messages over wss:// connections
Crypto exchanges pushing real-time price tickers to the browser
Sports betting sites delivering live odds via WebSocket frames
Common Use Cases
Frequently Asked Questions
Keep Learning
All termsSOCKS5
SOCKS5 is the latest version of the SOCKS proxy protocol. It routes any kind of network traffic — TCP and UDP — between a client and a server through a proxy, with optional authentication and no awareness of the underlying application.
Read definitionWeb Scraping
Web scraping is the automated extraction of data from websites — fetching pages programmatically and parsing their content into structured data.
Read definitionHTTP Proxy
An HTTP proxy is an intermediary server that forwards web (HTTP/HTTPS) requests on your behalf, able to read, cache and filter traffic at the application layer.
Read definitionSticky Session
A sticky session keeps the same proxy IP for a set period, so multi-step workflows like logging in and checking out stay on one consistent address.
Read definition