Web Worker
A Web Worker runs JavaScript in a separate execution context, helping keep long computations away from the main UI thread.
What it is
A Web Worker runs JavaScript in a separate execution context, helping keep long computations away from the main UI thread.
Why it matters
Moving work changes scheduling; it does not remove computation or transfer costs.
Example
A search worker receives a query, ranks a local index, and sends back the top results while typing stays responsive.
Technical detail
Workers communicate using messages. They cannot directly modify the document DOM.
When to use it
Move sustained parsing or inference work to a worker when measurements show blocked interaction.
Go deeper
Sources
More in Web platform
Assembled from the ReLU.chat curated knowledge base. These explanations are concise on purpose; check the sources for anything important.