Polling vs long polling vs WebSocket
Play this lessonThis lesson comes with an interactive animation you can break, a live-code challenge and a chapter quiz.Sending is easy: the client makes an HTTP request to the chat service (with keep-alive to reduce TCP handshakes). Receiving is the hard part, because HTTP is client-initiated. How does the server push a message to the receiver?
The rest of this lesson is part of Pro
Pro unlocks every lesson with its animation, code challenge and quiz, plus every interview problem. ₹299 a month or ₹1,999 a year.
See Pro