Skip to content
Latchkey

What Is a Web Worker?

A web worker is a browser thread that executes a script in the background, isolated from the page's main thread. It cannot touch the DOM directly and exchanges data with the page through message passing. Workers let CPU-heavy tasks run without blocking rendering or user input.

Why it matters

JavaScript on the main thread shares time with rendering and input handling, so a long computation stalls the UI. Moving that work to a web worker keeps the interface responsive.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →