O'Reilly logo

HTML5 Developer’s Cookbook by Tom Leadbetter, Chuck Hudson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Communication and Threading

The HTML5 APIs cover a wide range of improvements and areas, but two of the newest ones include the WebSocket and Web Workers APIs. These two sets fill some key gaps in website and web application development. Before these APIs, opening a bidirectional communication channel with servers was difficult. In addition, performing heavy processing in the page blocked the user interface from user interaction. The WebSocket API provides bidirectional communication between client JavaScript and a server over a socket connection, while the Web Workers API opens up basic threading options to client JavaScript. In this chapter, you will learn how to implement these APIs in some simple but effective recipes by which you can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required