The communication between servers and web browsers has been traditionally based on pooling, where the client (Web Browser) starts a querie to the server, and the server answers. This way, all the processes are on hold until the end of the server communication. In HTML5 a new concept is introduced as a standard: “Websockets”. This new standard allows a continuous full-duplex communication between the server and the client where they both can send and receive information. This technology makes possible to open interactive communications between the web browser and the server, allowing to send messages to the servers and receive the answer from the server without being specifically asked by the client. This helps having a better interaction between web browsers and web pages and facilitating an updated online content.
We design Web Applications that maximise the user experience (UX)
Other advantages of Websockets
Another advantage of using WebSocket is the reduction of unneeded traffic due to the absence of pooling. In this case, the client is continuously asking to connect every time that it needs information from the server. It does not take into consideration the times where the client starts a communication and there is nothing available in the server to be sent.
The webSocket protocol is supported by most of the web browsers, including Google Chrome, Internet Explorer, Firefox, Safari and Opera. WebSockets do also require Web applications to be installed in the server to be supported.
Where to use WebSockets:
They must be used every time a low latency communication between the server and the client is needed, or every time that we want to update the user interface with new information available in the server, without being the user or the browser who needs to start that communication.
- Online multiplayer games
- Chat applications
- Updated news (Live Sports)
- Real Time updates on Social Networks