HTML5 Web Worker Example: Basic

Click both of the "Crunch some numbers" buttons, and then keep clicking the "Re-Size Boxes" button.

You can re-size the boxes while the "crunch" function is crunching numbers.

This is because the crunching has been handed off to our web-worker, which runs in a seperate thread. As a result, the browser remains completely available and responsive.