TECHNOLOGY INDEX / REFERENCEWEB PLATFORM / CONCURRENCYBROWSER BACKGROUND THREADS
REFERENCE / WEB WORKERS
Web Workers
Web Workers run JavaScript in background threads that are isolated from the page interface and communicate through messages.
MOVE THE WORK.
KEEP INPUT RESPONSIVE.
They move CPU-heavy or independent jobs away from the main thread so rendering, input and interface updates can remain responsive.
THE CORE
IDEAS.
- 01
ISOLATED CONTEXT
Run code without direct access to the page DOM or the main thread’s local variables.
- 02
MESSAGE PASSING
Exchange structured data through posted messages and transferable buffers.
- 03
WORKER LIFECYCLE
Create, reuse and terminate workers according to the application workload.
KEEP EXPLORING / 03OFFICIAL