O'Reilly logo

Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development by Frank Salim, Brian Albers, Peter Lubbers

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

Chapter 8. Using the HTML5 Web Workers API

HTML5 Web Workers provide background processing capabilities to web applications and typically run on separate threads so that JavaScript applications using HTML5 Web Workers can take advantage of multicore CPUs. Separating long-running tasks into HTML5 Web Workers also avoids the dreaded slow-script warnings, shown in Figure 8-1, that display when JavaScript loops continue for several seconds.

Slow script warning in Firefox

Figure 8.1. Slow script warning in Firefox

As powerful as HTML5 Web Workers are, there are also certain things they cannot do. For example, when a script is executing inside an HTML5 Web Worker it cannot access the ...

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