1 / 2

Socket.io – Easy Way To Handle Websockets

The era of static websites has passed. Now users demand dynamic content and application like look and feel. Instead of constantly reloading the page and hitting F5, the page should adjust itself automatically.

hkinfosoft
Télécharger la présentation

Socket.io – Easy Way To Handle Websockets

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Socket.io – Easy Way To Handle Websockets Content Source: Python Web Development The era of static websites has passed. Now users demand dynamic content and application like look and feel. Instead of constantly reloading the page and hitting F5, the page should adjust itself automatically. Many of this can be accomplished with simple asynchronous requests from javascript. But what if you want to update your app only when there is a new data available on the server? You could send a ton of requests in a loop but that’ll use a lot of bandwidth and with more users could potentially DDoS your server or make it very slow. Web technologies are constantly evolving so it’s not exceptional that we have a solution for this problem. It’s called WebSockets. Websockets allows us to establish a stateful connection between browser and server so we can exchange pieces of information in both directions. It’s more efficient than standard request and response cycle from HTTP.

  2. Unfortunately, WebSockets are handled differently on different browsers so it’s not easy to implement the cross-browser code. And how about older browsers that don’t support WebSockets? We need some kind of wrapper that will work on different browsers and fallback to polling techniques on older ones. Socket.io does exactly that and also provides nice API and many additional features like broadcasting. Read more…..

More Related