Web workers make it easy to make a process run on a background thread off the UI thread.
This simple example asks a worker thread to return a random number.
You can try it for yourself here:
Here’s the code:
Source code can be downloaded here: