Basically, Web Workers  ðŸ¤–

Web Workers are little helper scripts that are executed off the main thread of your browser and therefore don't block things, particularly the current active document, or the DOM.

To see what this looks like inreallife, click the button below to perform a complex calculation in the browser, and then contrast it with performing the same calculation asynchronously and also in a worker, while observing this GIF.

Tapping "run in browser sync" repeatedly will help see the DOM being blocked.

Demo Image
Action Status

Tap repeatedly to emphasize pausing.

Notice how speed-wise, it varies quite a bit. In fact, in some cases, it is actually slower to execute a worker because it is quite expensive to copy over a dataset from the browser into a worker, and then back from a worker into the browser. That said, workers really help not annoy your users with slow, blocking processing, and boost the perceived speed of your application. Heh, cool.

Further reading: there's more kinds of workers and a lot more to read and explore. I hope this helped you!