June 2011
Intermediate to advanced
320 pages
7h 14m
English
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.
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 ...
Read now
Unlock full access