Introduction to WebSockets
Learn the concepts underlying all WebSocket applications, including the WebSocket handshake, persistence, and communication patterns.
StartWhat Are WebSockets?
Lesson 1 of 1
- 1Imagine that your favorite basketball team is playing but you can’t watch the game live. You’re trying to follow the score on your phone but you can only get the live score by manually pressing a b…
- 2The main feature of a WebSocket connection is that they allow continuous and bidirectional communication between a server and a client. In addition to the client sending data to the server, the ser…
- 3In order for WebSocket connections to achieve bidirectional and continuous communication, there must first exist a persistent connection. To help us understand this, let’s start by refreshing ho…
- 4Where do these persistent WebSocket connections come from? Don’t worry, the answer doesn’t involve storks. WebSockets actually originate from our old friend, HTTP, and something called a _handshake…
- 5You may notice that some websites (including Codecademy.com) use the https:// protocol at the beginning of the URI while others use http://. So what’s the difference? [https:// is the secure vers…
- 6So far we’ve learned about the communication capabilities of WebSocket connections, the benefits of persistent connections, some details about how an HTTP connection can be upgraded to a WebSocket …
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory