What is a WebSocket frame?

Updated May 6, 2026

Short answer

A frame is a unit of data transmitted over a WebSocket connection.

Deep explanation

WebSocket messages are broken into frames containing metadata and payload. Frames enable efficient streaming of large messages.

Real-world example

Streaming video chunks over WebSockets.

Common mistakes

  • Confusing frames with HTTP packets.

Follow-up questions

  • Are frames visible to developers?

More WebSockets interview questions

View all →