Web Workers
Runs scripts on background threads with no prompt.
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
| Browser | Status | First version | Released | Note |
|---|---|---|---|---|
| Chrome | Supported | 2 | 2009-05-21 | None |
| Edge | Supported | 12 | 2015-07-29 | None |
| Firefox | Supported | 3.5 | 2009-06-30 | None |
| Safari | Supported | 4 | 2009-06-08 | None |
| Safari on iPhone | Supported | 5 | 2011-10-12 | All iOS browsers use WebKit |
| Chrome on Android | Supported | 18 | 2012-06-27 | None |
| Samsung Internet | Supported | 1.0 | 2013-04-27 | None |
How a site asks for it
| API | new Worker(url, {type:'module'}); SharedWorker; navigator.hardwareConcurrency |
| Browser compat keys | api.Workerapi.SharedWorkerapi.Navigator.hardwareConcurrency |
| How access is granted | none |
| What the user sees | None (no browser prompt) |
| Needs a secure context (HTTPS) | No |
| Needs a user gesture | No |
| Activation | none |
| How long it lasts | Dedicated workers end with the page; shared workers end when the last client closes |
| How to take it back | Nothing to revoke (no permission is stored) |
| Inside an iframe | Same-origin script only; module workers supported; blob: workers allowed |
Typical flow
- Create Worker
- Post messages
- 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
| Type | Example | Apps |
|---|---|---|
| creative | A photo editor applies filters in a worker so sliders stay smooth. | Photopea, Squoosh |
| games | A browser game runs physics and AI on a worker so the frame rate does not drop. | None named |
| video | A video call tool blurs your background in a worker. | Google Meet, Zoom web |
| security | A hidden crypto miner runs in a worker in a shady site tab. | None named |
| productivity | A web spreadsheet recalculates in a worker so typing stays quick. | Google Sheets |
| analytics | Analytics 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
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 5 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 3 | Rough 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
Related capabilities
Related
- Service Worker offline caching. Can save pages on your device so the site works offline
- WebAssembly (threads, SIMD, memory limits). Can run fast compiled code inside the page, within memory limits
Sources
How well checked: Based on official documentation.