How To Build A Live Chat With WebSockets
WebSockets are a fascinating technology, a TCP-based network protocol that allows for asynchronous bi-directional communication. The client starts a connection, sends a request and gets a response – just like HTTP. But much unlike HTTP this connection is kept alive! This has many advantages, like
Faster responses (no re-establishing connections) Less trafic (no overhead for HTTP-headers) Live updates (no periodic polling, but push notifications) If you want to learn more about WebSockets, I recommend this introduction.