Intent to Ship: SharedWorker on Android

273 views
Skip to first unread message

Chromestatus

unread,
Mar 25, 2026, 10:34:12 PM (11 days ago) Mar 25
to blin...@chromium.org, dom...@chromium.org, yyana...@google.com
Contact emails
yyana...@google.com, dom...@chromium.org

Specification
https://html.spec.whatwg.org/multipage/workers.html#shared-workers-and-the-sharedworker-interface

Summary
For a long time, SharedWorker has been disabled on Android due to concerns about its unpredictable process lifecycle. We believed that SharedWorker instances might terminate unexpectedly, without noticing to users or web developers, which we considered unacceptable. However, a recent discussion on GitHub (https://github.com/whatwg/html/issues/11205) suggests that the unpredictable nature of SharedWorker's process lifecycle might not be as significant an issue as we once thought. Based on this, we plan to re-enable SharedWorker on Android while simultaneously investigating this behavior to ensure a stable and reliable experience.

Blink component
Blink>Workers

Web Feature ID
shared-workers

Motivation
The long-standing demand for SharedWorker support on Android stems from several needs expressed by web developers: - Resource Sharing and Efficiency: Developers aim to share a single WebSocket or Server-Sent Events (SSE) connection across multiple tabs, thereby conserving resources. - Persistent Resource Management: There's a strong desire to share and persist resources across tabs, particularly for technologies like WASM-based SQLite. - Closing a Feature Gap: It has been noted that other major mobile browsers, including Safari on iOS and Firefox on Android, already support SharedWorker, making Chrome on Android the last major browser to address this gap.

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Origin Trial Name
SharedWorker on Android

Goals for experimentation
The goal is to evaluate the real-world impact of Android's process lifecycle on SharedWorker stability. Unlike on desktop, SharedWorker instances on Android can be terminated unexpectedly by the operating system due to memory pressure. This trial allows us to release the feature to developers who understand this risk and can provide crucial feedback. Specifically, we aim to measure: 1. The frequency of unexpected SharedWorker terminations in real-world scenarios. 2. Whether the current API is sufficient for developers to handle such terminations gracefully. 3. The necessity of potential spec-level countermeasures, as discussed in https://github.com/whatwg/html/issues/11205, to bridge this behavioral gap between mobile and desktop platforms and ensure a consistent developer experience. The insights from this experiment will be critical in determining the path to shipping SharedWorker on Android, informing whether it can be enabled by default or if further mitigation work is required.

Chromium Trial Name
SharedWorkerOnAndroid

Origin Trial documentation link
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker

WebFeature UseCounter name
kSharedWorkerStartOnAndroid

Risks


Interoperability and Compatibility
While Chrome has been the sole major browser not to offer SharedWorker, this change aims to close that gap. However, unlike on desktop, Android's unpredictable process lifecycle presents a unique risk. SharedWorker instances might terminate unexpectedly, for example, when a Chrome app is moved to the background and then foregrounded. This inherent uncertainty in the Android environment is a key risk when running SharedWorker.

Gecko: Shipped/Shipping

WebKit: Shipped/Shipping

Web developers: Positive As you can see in http://crbug.com/40290702, SharedWorker support on Android has been a long-awaited feature by web developers. This demonstrates a clear and sustained demand from the developer community for this capability.

Other signals:

Ergonomics
n/a

Activation
n/a

Security
This feature is already shipped on desktop, and no new security risks are introduced with the Android implementation.

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No information provided


Debuggability
This feature is already shipped on desktop, and no new debuggability issues should be introduced with the Android implementation.

Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?
No
This aims to make SharedWorker supported on Android and Android WebView. SharedWorker has been supported other than them.

Is this feature fully tested by web-platform-tests?
Yes
SharedWorker tests under https://wpt.fyi/results/workers. e.g. https://wpt.fyi/results/workers/SharedWorker-simple.html Note that since wpt.fyi runs tests on Linux not Android for Chromium.

DevTrial instructions
https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker/SharedWorker

Flag name on about://flags
No information provided

Finch feature name
SharedWorker

Rollout plan
Will ship enabled for all users

Requires code in //chrome?
False

Tracking bug
https://crbug.com/40290702

Measurement
https://chromestatus.com/metrics/feature/timeline/popularity/5626 Content.SharedWorker.Host.DestructionSource to understand how SharedWorkers finish (worker.close(), no clients, or worker gone (possibly crash)).

Estimated milestones
Origin trial desktop first140
Origin trial desktop last144
Origin trial extension 1 end milestone147
Shipping on Android148
Origin trial Android first140
Origin trial Android last144
DevTrial on Android140
Shipping on WebView148


Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).

No information provided

Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/6265472244514816?gate=5084552061779968

Links to previous Intent discussions
Intent to Experiment: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/6879be98.2b0a0220.72055.015d.GAE%40google.com
Intent to Extend Experiment 1: https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAPNB-6VPRn%2BLp%2B61oJOc2e3fnY3F1LaZ2f2g_LTsA%3DXv49FzgQ%40mail.gmail.com


This intent message was generated by Chrome Platform Status.

Mike Taylor

unread,
Mar 26, 2026, 11:19:48 AM (10 days ago) Mar 26
to Chromestatus, blin...@chromium.org, dom...@chromium.org, yyana...@google.com

On 3/25/26 10:33 p.m., Chromestatus wrote:

Contact emails
yyana...@google.com, dom...@chromium.org

Specification
https://html.spec.whatwg.org/multipage/workers.html#shared-workers-and-the-sharedworker-interface

Summary
For a long time, SharedWorker has been disabled on Android due to concerns about its unpredictable process lifecycle. We believed that SharedWorker instances might terminate unexpectedly, without noticing to users or web developers, which we considered unacceptable. However, a recent discussion on GitHub (https://github.com/whatwg/html/issues/11205) suggests that the unpredictable nature of SharedWorker's process lifecycle might not be as significant an issue as we once thought. Based on this, we plan to re-enable SharedWorker on Android while simultaneously investigating this behavior to ensure a stable and reliable experience.

Blink component
Blink>Workers

Web Feature ID
shared-workers

Motivation
The long-standing demand for SharedWorker support on Android stems from several needs expressed by web developers: - Resource Sharing and Efficiency: Developers aim to share a single WebSocket or Server-Sent Events (SSE) connection across multiple tabs, thereby conserving resources. - Persistent Resource Management: There's a strong desire to share and persist resources across tabs, particularly for technologies like WASM-based SQLite. - Closing a Feature Gap: It has been noted that other major mobile browsers, including Safari on iOS and Firefox on Android, already support SharedWorker, making Chrome on Android the last major browser to address this gap.

Initial public proposal
No information provided

TAG review
No information provided

TAG review status
Not applicable

Origin Trial Name
SharedWorker on Android

Goals for experimentation
The goal is to evaluate the real-world impact of Android's process lifecycle on SharedWorker stability. Unlike on desktop, SharedWorker instances on Android can be terminated unexpectedly by the operating system due to memory pressure. This trial allows us to release the feature to developers who understand this risk and can provide crucial feedback. Specifically, we aim to measure: 1. The frequency of unexpected SharedWorker terminations in real-world scenarios. 2. Whether the current API is sufficient for developers to handle such terminations gracefully. 3. The necessity of potential spec-level countermeasures, as discussed in https://github.com/whatwg/html/issues/11205, to bridge this behavioral gap between mobile and desktop platforms and ensure a consistent developer experience. The insights from this experiment will be critical in determining the path to shipping SharedWorker on Android, informing whether it can be enabled by default or if further mitigation work is required.
It looks like this was left from a previous intent to experiment - but could you summarize your findings from the experiment?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/69c49b14.050a0220.2ec94.0888.GAE%40google.com.

Torne (Richard Coles)

unread,
Mar 26, 2026, 11:42:02 AM (10 days ago) Mar 26
to Chromestatus, blin...@chromium.org, dom...@chromium.org, yyana...@google.com
You mention that you plan to enable this on Android WebView as well.

Since WebView currently has a renderer process limit of 1, will any shared workers also run inside that same single renderer process? If so, then I don't think there's any issue for WebView here and I support experimenting/shipping.

--

Alex Russell

unread,
Mar 27, 2026, 3:32:19 PM (9 days ago) Mar 27
to blink-dev, Richard Coles, blin...@chromium.org, Domenic Denicola, yyana...@google.com, Chromestatus
LGTM1, contingent on a reply to Mike's question about OT findings.

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Yoshisato Yanagisawa

unread,
Mar 30, 2026, 1:23:43 AM (6 days ago) Mar 30
to Alex Russell, blink-dev, Richard Coles, Domenic Denicola, Chromestatus
Here is a summary of the Origin Trial findings.

Currently, there are 34 total Origin Trial (OT) sign-ups, including medium and large users. Since we were concerned about unexpected SharedWorker renderer termination, we monitored the termination reasons. We observed a smooth increase in usage, as reflected by the termination counts (covering both expected and unexpected cases), throughout the origin trials. Contrary to our concerns, the proportion of possibly crash-related terminations is not significant on Android when compared to desktop platforms. Furthermore, despite the increase in origin trial attendees, we have not received any reports of unstable SharedWorkers.

During the origin trials, there was an Interop request concerning SharedWorker on Android (https://github.com/web-platform-tests/interop/issues/1064). Although this request was not selected for Interop 2026, it demonstrates community interest in the feature. Therefore, I believe there is sufficient interest in the feature itself, and the rate of unexpected SharedWorker crashes, which was our main concern, appears to be much lower than we anticipated. I see it is reasonable to move forward.

Regarding Android WebView, Torne's understanding is correct: SharedWorkers typically run within the same renderer process as their creator.

I hope this addresses both questions. Please feel free to ask if anything is unclear.

2026年3月28日(土) 4:32 Alex Russell <sligh...@chromium.org>:
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Philip Jägenstedt

unread,
Mar 30, 2026, 7:11:37 AM (6 days ago) Mar 30
to Yoshisato Yanagisawa, Alex Russell, blink-dev, Richard Coles, Domenic Denicola, Chromestatus
LGTM2, thanks for the OT findings summary. It's encouraging that SharedWorkers don't seem to be less reliable than on desktop so far. I presume you'll keep in the metrics to monitor this as usage on Android grows with the stable rollout?

Mike Taylor

unread,
Mar 30, 2026, 8:56:48 AM (6 days ago) Mar 30
to Philip Jägenstedt, Yoshisato Yanagisawa, Alex Russell, blink-dev, Richard Coles, Domenic Denicola, Chromestatus

Yoshisato Yanagisawa

unread,
Mar 30, 2026, 11:17:03 PM (6 days ago) Mar 30
to Philip Jägenstedt, Alex Russell, blink-dev, Richard Coles, Domenic Denicola, Chromestatus
Yes.  I plan to leave the metrics after shipping, and will see how it will be for a while.

2026年3月30日(月) 20:11 Philip Jägenstedt <foo...@chromium.org>:
Reply all
Reply to author
Forward
0 new messages