What Are WebSockets?
Lesson 1 of 1
  1. 1
    Imagine 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…
  2. 2
    The 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…
  3. 3
    In 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…
  4. 4
    Where 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…
  5. 5
    You 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…
  6. 6
    So 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 …
  7. 7
    Congratulations! In this lesson you have built a strong conceptual foundation of what WebSockets are and how they are created. With the growing number of real-time applications, WebSockets introduc…

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory