A Web Worker runs a script on a separate thread with its own event loop. It can't touch the DOM; it talks to the page with postMessage (structured clone or transferable objects). Use it for CPU-heavy work such as parsing a large file, image processing or crypto, so the main thread stays responsive. The cost is copying data across and more complex code, so first check whether the work could be done on the server or paginated.
Checks they know the browser's only real parallelism model and its limits
Last updated 23 Nov 2026.