v148 · web workers · android · shipped
SharedWorker on Android
SharedWorker — long available on desktop — now ships on Android in Chrome 148. Shared workers allow multiple browsing contexts (tabs, iframes, workers) in the same origin to share a single background worker instance and communicate through its port interface. Ships in Chrome 148 on Android and WebView.
this API is documented on MDN
Constructor shape (unchanged by this release; Chrome 148 enables it on Android and WebView):
const worker = new SharedWorker("/workers/shared.js", { name: "shared-1" });
worker.port.start();
worker.port.postMessage("ping");
worker.port.addEventListener("message", (e) => console.log(e.data));
Source: HTML spec §Shared workers (SharedWorker(url, options), options.name, port), May 2026.
Formal syntax (Web IDL)
Verbatim from the HTML Standard. Chrome 148 does not change this interface; it turns it on for Android and WebView.
[Exposed=Window]
interface SharedWorker : EventTarget {
constructor((TrustedScriptURL or USVString) scriptURL, optional (DOMString or SharedWorkerOptions) options = {});
readonly attribute MessagePort port;
};
SharedWorker includes AbstractWorker;
dictionary SharedWorkerOptions : WorkerOptions {
boolean extendedLifetime = false;
};
Passing a string as options is shorthand for { name: string }. WorkerOptions adds name (default ""), type ("classic" or "module") and credentials; AbstractWorker adds the onerror handler. extendedLifetime is a separate Chrome 148 feature, documented at Extended lifetime shared workers. Per-option support on Android is in the compatibility table.
MDN's SharedWorker page covers the full API. Chrome 148 browser-compat data for Android will be reflected once MDN is updated.
at a glance
| Shipped in | Chrome 148 (Android, WebView) |
|---|---|
| Desktop support | Chrome 5+ (long-standing; per BCD) |
| Status | Enabled by default |
| ChromeStatus | 6265472244514816 — SharedWorker on Android |
why it was disabled on Android
SharedWorkers were removed from Android in Chrome 40 (around 2015) due to memory and stability concerns on mobile hardware of that era. As Android devices have improved significantly, the Chromium team re-evaluated and ran an origin trial (Chrome 145–147) to validate stability before shipping to all Android users in Chrome 148.
Source: blink-dev Intent to Ship (Chrome 148); Intent to Experiment.basic usage
// main.js (multiple tabs can connect to the same worker)
const worker = new SharedWorker('/shared-worker.js');
worker.port.start();
worker.port.addEventListener('message', (e) => {
console.log('From shared worker:', e.data);
});
worker.port.postMessage({ type: 'hello', from: location.href });
// shared-worker.js
const ports = new Set();
self.addEventListener('connect', (e) => {
const port = e.ports[0];
ports.add(port);
port.start();
port.addEventListener('message', (e) => {
// Broadcast to all connected tabs
for (const p of ports) {
p.postMessage({ echo: e.data });
}
});
});
Live example
All concept demos for this feature are listed on the Chrome Platform Showcase feature page. Open the embedded counter in a second tab (on Android too, from Chrome 148) to see both tabs share one worker.
browser support
Per-version data from BCD api/SharedWorker.json (raw JSON fetched 2026-11-15). Edge and WebView Android are BCD mirror entries, resolved here from Chrome and Chrome Android.
| Feature | Chrome | Chrome Android | WebView Android | Edge | Firefox | Firefox Android | Safari | Safari iOS |
|---|---|---|---|---|---|---|---|---|
SharedWorker(), port, error event | 5 | 148 | 148 | 79 | 29 | 33 | 16 (also 5–7) | 16 (also 5–7) |
options.name | 70 | 148 | 148 | 79 | 55 | 55 | No | No |
options.type ("module") | 80 | 148 | 148 | 80 | 114 | 114 | 15 | 15 |
options.extendedLifetime | 148 | 148 | 148 | 148 | No | No | No | No |
BCD also records sameSiteCookies (Chrome 125, Chrome Android 148) and that Chrome does not enforce worker-script MIME checks. Samsung Internet shipped SharedWorker in 4.0 and removed it in 5.0 (BCD).
see also
- MDN: SharedWorker
- MDN: Using Web Workers
- WHATWG HTML Standard — Shared workers and the SharedWorker interface
- chromestatus.com — SharedWorker on Android (6265472244514816)
- chromestatus: API record 6265472244514816
- chromestatus: milestone=148 listing
- WHATWG HTML issue #11205: SharedWorker lifecycle
- Chromium Issue 40290702
- webstatus.dev: shared-workers
- BCD: api/SharedWorker.json
- chrome-platform-showcase: demos