O'Reilly logo

HTML5 Guidelines for Web Developers by Bernd Öggl, Klaus Förster

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

10. Web Workers

If you have already been experimenting a bit with JavaScript, you may have come across a browser message similar to this: A script on this page may be busy, or it may have stopped responding. This could be the result of a programming error, perhaps an endless loop. But what should you do if your JavaScript does not have an error and the calculation is just taking a bit longer than usual? This is where web workers come in.

10.1 Introduction to Web Workers

To ensure that long calculations on the client side do not block the browser, a worker can work in the background and inform the calling script about the status of its calculations via messages. Workers have no access to DOM APIs, the window object, and the document object. What ...

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