v148 · web api · covered on mdn
Extended lifetime shared workers
A new extendedLifetime: true option on the SharedWorker constructor keeps the worker alive after all its clients have unloaded. This lets pages hand off in-flight async work — network requests, IndexedDB writes, analytics flushes — to a shared worker that outlives any individual page, without needing a Service Worker.
this feature is documented on MDN
MDN: SharedWorker
MDN's SharedWorker reference documents the extendedLifetime constructor option (“can be set to keep a shared worker alive”) together with the API's browser compatibility. gendn doesn't duplicate that here.
quick reference
| Constructor option | new SharedWorker(url, { extendedLifetime: true }) |
|---|---|
| Effect | Worker stays alive after the last client unloads; terminates when it becomes idle (no pending tasks, microtasks, or Web Locks) |
| Standard SharedWorker | Terminates as soon as the last client disconnects |
| Shipped in | Chrome 148 (desktop + Android + WebView) |
| Origin trial ran | Chrome 139 – 148 |
| Blog post | Extended lifetime shared workers — Chrome for Developers |
| ChromeStatus | 5138641357373440 — Extended lifetime shared workers |