Difference between HTTP and WebSocket (HTTP 2.0 )

Visual comparison between HTTP and WebSocket, check out this TL;DR chart

  • WebSocket is a protocol providing full-duplex communication channels over a single TCP connection. Where as, HTTP providing half-duplex communication.

  • Information exchange mode of WebSocket is bidirectional. Means, server can push information to the client (which does not allow direct HTTP).

  • The contents of each stream are HTTP requests and responses, just encoded and packed up differently. Where as, WebSocket adds a number of features to manage the streams, but leaves old semantics untouched.

  • If an encrypted WebSocket connection is used, then the use of Transport Layer Security (TLS) in the WebSocket Secure connection ensures that an HTTP CONNECT command is issued when the browser is configured to use an explicit proxy server. This sets up a tunnel, which provides low-level end-to-end TCP communication through the HTTP proxy, between the WebSocket Secure client and the WebSocket server.

Reference - Windows Blog


Read Community Guidelines
You've successfully subscribed to Developer Insider
Great! Next, complete checkout for full access to Developer Insider
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.