Skip to Content
Platform.Ontology

Web Workers

Runs scripts on background threads with no prompt.

Works without askingThings a page can doComputeWeb browsersWhile you use it

In one line

Can run extra code in the background while the page is open

Runs scripts on background threads with no prompt.

A site can use multiple CPU cores while the tab is open. Workers cannot touch the DOM but can run timers, network and compute, which is how miners and heavy trackers hide from the UI thread.

What it can and can't do

What the user does: Nothing. It happens when the page loads or starts a heavy job.

It can

  • Run heavy work on a second thread so the page stays smooth
  • Keep a worker running while the tab is open
  • Run several workers at once

It cannot

  • Change what is on the page directly
  • Keep running after you close the tab
  • Use unlimited power; browsers slow hidden tabs
  • Reach other sites' workers or data

Browser support

BrowserStatusFirst versionReleasedNote
ChromeSupported22009-05-21None
EdgeSupported122015-07-29None
FirefoxSupported3.52009-06-30None
SafariSupported42009-06-08None
Safari on iPhoneSupported52011-10-12All iOS browsers use WebKit
Chrome on AndroidSupported182012-06-27None
Samsung InternetSupported1.02013-04-27None

How a site asks for it

APInew Worker(url, {type:'module'}); SharedWorker; navigator.hardwareConcurrency
Browser compat keysapi.Worker
api.SharedWorker
api.Navigator.hardwareConcurrency
How access is grantednone
What the user seesNone (no browser prompt)
Needs a secure context (HTTPS)No
Needs a user gestureNo
Activationnone
How long it lastsDedicated workers end with the page; shared workers end when the last client closes
How to take it backNothing to revoke (no permission is stored)
Inside an iframeSame-origin script only; module workers supported; blob: workers allowed

Typical flow

  1. Create Worker
  2. Post messages
  3. Terminate on close

Data you get

Shape: none

No individual data fields. The signal is the access itself.

Technical limits

  • Firefox limits to 512 workers per domain (dom.workers.maxPerDomain); Chrome has no fixed cap but memory limited
  • Background tabs throttle timers in workers just like pages; intensive throttling applies
  • SharedWorker returned to Android Chrome at version 148 (BCD); long absent on mobile
  • No access to window, document or localStorage; IndexedDB, fetch, WebSockets work
  • Worker script must be same origin (or data via importScripts with CORS)

The story

What it is

A page can run extra background workers, with no prompt.

For you

You never see them. Heavy tasks like photo editing run in the background so the page does not freeze while you type.

For makers

Makers use them to keep pages smooth while crunching data. Bad actors use the same trick to mine crypto in your tab without telling you.

Where you see it

TypeExampleApps
creativeA photo editor applies filters in a worker so sliders stay smooth.Photopea, Squoosh
gamesA browser game runs physics and AI on a worker so the frame rate does not drop.None named
videoA video call tool blurs your background in a worker.Google Meet, Zoom web
securityA hidden crypto miner runs in a worker in a shady site tab.None named
productivityA web spreadsheet recalculates in a worker so typing stays quick.Google Sheets
analyticsAnalytics tools process events in a worker to avoid slowing the page.None named

Risks

  • Hidden crypto mining
  • Battery drain

What the platform says

  • Mozilla: Web Workers API. MDN says workers let a page run scripts in background threads so the main page stays responsive.

Good uses and abuse

Legitimate uses

  • Off thread compute
  • Streaming parsers
  • Offline sync

Known abuse

  • In-browser miners
  • Parallel fingerprint probing
  • Background brute force

Scores

ScoreValueMeaning
Sensitivity1 of 5How revealing the data is
Utility5 of 5How useful it is to honest apps
Friction0 of 5How much the user has to do
Fingerprint bits3Rough identifying entropy, when known

History

  • 2010-01, Firefox 3.5: Dedicated Web Workers
  • 2021-01, Chrome 80: Module workers ship
  • 2023-03, Safari 15: Module workers in Safari

Sources

How well checked: Based on official documentation.

On this page