Web APIs

Web Workers API

Checking compatibility...

Run JavaScript in background threads to perform CPU-intensive tasks without blocking the main UI thread. Includes dedicated workers, shared workers, and transferable objects.

Basic Worker

Send tasks to a background helper that works independently from your main page. This example shows how to create a Web Worker and exchange messages with it, allowing your app to multitask without slowing down.

=
=
=
=
=
=

Output

Click Run to see output...

Calculation Worker

Run complex calculations without freezing your app. This example demonstrates how to perform intensive number crunching in the background while keeping your interface responsive, complete with real-time progress updates.

=
=
=
=
=
=

Output

Click Run to see output...