November 2011
Intermediate to advanced
384 pages
13h 23m
English
Using Web Workers in HTML5 is a very easy way to add in a level of optimization that was not possible a few short years ago. Previously, JavaScript could run in only one thread in the browser, and any CPU-intensive tasks bogged down user interface features. When you split up your CPU-intensive code into a Web Worker JavaScript file, your users can continue using your website while the Web Worker asynchronously works.
To convert existing JavaScript code into Web Worker code, you need to create a conduit that allows for subroutines to be executed by way of event messages. The parent JavaScript thread running in the browser window will send event messages to a listener running on your Web Workers, and they in ...
Read now
Unlock full access