HTML5 provides a new thing called a WebSocket. Now data can flow between the browser and server without having to send HTTP headers until the connection is broken down again. Welcome to the world of PUSH technology!
What is Websocket?
WebSocket is bi-directional (full-duplex) communication channel over a single TCP (Transmission Control Protocol) socket for client or server application... goes too much technical, ok then
WebSockets opens a connection to a server and the connection stays open until you decide to close it. From there, you can start sending messages from the browser to the server and you can define a callback function for when the server send data back. Basically we got rid of each time new request for server.
What is Websocket?
WebSocket is bi-directional (full-duplex) communication channel over a single TCP (Transmission Control Protocol) socket for client or server application... goes too much technical, ok then
WebSockets opens a connection to a server and the connection stays open until you decide to close it. From there, you can start sending messages from the browser to the server and you can define a callback function for when the server send data back. Basically we got rid of each time new request for server.