Service Workers

From MozillaWiki
Jump to: navigation, search

Service Workers are presently being implemented in Gecko. Biweekly calls (2015-08-12 is the next one) are held on Wednesdays at 8 AM Pacific in the WebAPI Vidyo room to discuss status and blockers for consumers. Email Andrew Overholt [:overholt] if you want to be added to the meeting invite or just show up.

Most people working on the implementation hang out in #content on IRC.

Implementation status

Lots of code has been written and much functionality exists. There are a variety of prefs you can flip in about:config to turn them on: dom.serviceWorkers.enabled, dom.serviceWorkers.interception.enabled, etc.

Filing bugs (in Core :: DOM: Service Workers) describing problems you have is highly appreciated.

An audit of call sites where existing networking security functionality can be affected by a Service Worker's interception is underway. The results of this are filtering into Bugzilla and the remaining blockers are tracked as below.

Shipping on Desktop (planned for 44) (bug 1059784)

No results.

0 Total; 0 Open (0%); 0 Resolved (0%); 0 Verified (0%);


Bugs we should fix to be compatible with the specification (bug 1226983)

Full Query
ID Summary Status Assigned to Resolution
1112134 Hide window.caches and self.caches if the nsIPrincipal can't use Service Worker Cache NEW :Ehsan Akhgari
1113522 Expose ServiceWorker in Workers (aka ServiceWorkerRegistration returns null for all of installing, waiting, active in Workers/ServiceWorkers) NEW
1131324 Expose ServiceWorkerContainer on WorkerNavigator NEW
1170795 Calling FetchEvent.respondWith() with a malformed synthesized redirected response causes us to hit the network NEW
1183245 Service worker registration should be wiped when origin storage is wiped NEW Jan Varga [:janv]
1183625 support fetch window option NEW
1187300 Interception never occurs for channels created by Downloads.jsm NEW
1187328 service workers should not be able to make http requests when there is no browsing context NEW
1189945 Remove nsIChannel CorsMode flag and set Request.mode based on nsILoadInfo securityFlags instead NEW
1196097 Use SameObject for source attribute of ServiceWorkerMessageEvent interface NEW
1203747 Performance timing API should record on Service Workers NEW
1209102 fetch() should not allow redirects to data URIs NEW
1228149 Return the same ServiceWorkerRegistration object from service worker APIs on workers NEW
1229061 Implement the correct window focusing behaviour when the user clicks a notification NEW
1248417 test and implement relative redirects behavior during service worker interception NEW
1255275 Return the same ServiceWorkerRegistration object from service worker APIs exposed from ServiceWorkerContainer on workers NEW
1257977 queue tasks to update attributes on ServiceWorker and ServiceWorkerRegistration NEW
1263670 Consider reloading when a document restored from bfcache gets controlled by a different service worker NEW
1263734 Implement navigator.serviceWorkers.startMessages() NEW
1264175 Remove FetchEvent.isReload NEW
1264177 Implement FetchEvent "resulting" clientId attributes NEW
1264180 Implement Client.ancestorOrigins REOPENED
1264182 remove URL.createObjectURL from ServiceWorker NEW
1268323 service workers should not control https iframes nested under insecure documents NEW
1282426 fetch spec requires lower case headers, but UA added headers are mixed case NEW
1290936 Remove Client.frameType attribute REOPENED
1290950 intercept notification icon loads when opened from a service worker NEW
1290958 Implement service worker navigation preload NEW
1291893 basic authorization header is not added to service worker fetch() network request NEW
1304382 unregister service workers if cookies are blocked for an origin NEW
1330319 Headers in Headers object not lexicographically sorted NEW
1330943 showNotification() promise fulfills too soon NEW
1332393 web.telegram.org push notifications opened inconsistently NEW
1339434 match spec change to remove skip-service-worker flag NEW
1340659 XHR in Worker scripts does not use correct referrer-policy NEW
1341301 Resending form post data is broken if a service worker is registered NEW
1342484 Support Fetch keepalive flag and enforce limit on inflight keepalive bytes UNCONFIRMED
1346375 requireInteraction doesn't seem to be working NEW
1348082 ExtendableMessageEvent `origin` is set incorrectly NEW
1349589 Enable fetch cancellation by default on nightly NEW
1354577 use new service worker mime type restrictions NEW
1360870 Implement "module" service workers NEW
1362769 Private window shows notifications from the site in normal window UNCONFIRMED
1362824 A blob created from a fetch response does not correctly get type set UNCONFIRMED
1369476 PushEvent is not fired in e10s mode when there are no content processes running NEW
1378587 Default value for dom.serviceWorker.idle_timeout too agressive NEW
1384006 What's the right JSContext state to pass to cache::PutAll() in Cache::FetchHandler::ResolvedCallback ? NEW
1388774 Track total synthesized body size better during service worker interception NEW
1390657 Firefox Nightly Registers Service Worker in windows with insecure opener UNCONFIRMED
1392241 Align with Fetch on data: URLs NEW
1394102 FetchEvent.request.signal should be correctly aborted NEW Andrea Marchesini [:baku]
1399446 Implement ServiceWorkerGlobalScope and ServiceWorkerContainer onmessageerror event handler. NEW
1402785 Require a user gesture for Notification.requestPermission() NEW
1409007 service worker update does not trigger if loading is blocked with X-Frame-Options:Deny NEW
1411349 how should push notifications work for standalone web apps? NEW
1413589 push notifications are unreliable when firefox is not running NEW
1413615 consider allowing service workers when cookie policy is "keep until I close firefox" NEW
1416392 worker script loads set wrong accept header NEW
1417338 fetch sets wrong Content-Type header on redirects UNCONFIRMED
1418457 propagate the internal error code from Response to the outer intercepted channel NEW
1418489 observing a window is gone via Clients API should evict it from bfcache NEW
1426401 Consider persisting waiting worker state to disk and triggering an activate event on/after next browser start NEW
1428130 remove cookie permission preload after service worker code checks storage access in parent process. NEW
1428452 sometimes we load service workers from normal ScriptLoader instead of CacheStorage NEW
1430999 Service Workers can navigate uncontrolled clients UNCONFIRMED
1434913 make FetchEvent.clientId non-nullable NEW
1435083 [ServiceWorker] client.focus() brings wrong activity to the front UNCONFIRMED
1444944 Fetch API Body readers to not propagate underlying errors to Promise rejection NEW
1448979 service worker interception should propagate redirect count to enforce redirect limits NEW
1453301 Stop supporting about:blank in fetch() NEW
1453602 [wpt-sync] Sync PR 7261 - Fetch: fragments in responses NEW
1453612 Response.redirect() should have empty string statusText NEW
1455077 investigate where service worker code should call NS_CheckContentLoadPolicy() NEW
1455078 move service worker secure context checks to a webidl [Func] annotation NEW
1456105 Fetch: Content-Encoding decoding failure should be a TypeError NEW
1456479 Implement Request.isReloadNavigation NEW
1459781 service worker fetch event not happen when html generated from document.write NEW
1460299 Fetch: content-length header is being added to the safe-list NEW
1464739 Implement isHistoryNavigation attribute on Request UNCONFIRMED
1465074 Allow range requests to pass through a service worker UNCONFIRMED
1466438 Service Workers and uBlock/uMatrix shows the offline page NEW
1466499 Inline replies to web notifications should be supported UNCONFIRMED
1467454 cross-origin stylesheet load without "crossorigin" attribute treats service worker synthesized CORS response as opaque NEW
1467998 <script> element without "cross-origin" attribute treats service worker synthesized CORS response as opaque REOPENED

84 Total; 84 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Shipping on Fennec (aka Firefox for Android) (bug 1207262)

Full Query
ID Summary Status Assigned to Resolution
1210282 Intermittent android debug failures NEW

1 Total; 1 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Refactoring for n content processes (bug 1231208)

Full Query
ID Summary Status Assigned to Resolution
1182117 Move ServiceWorkerManager to the parent process in e10s NEW
1226434 A content process should run while it has active service workers NEW
1231213 Refactor ServiceWorkerPrivate to spawn and hold open WorkerPrivate instances in content processes, dispatching events to them ASSIGNED Andrew Sutherland [:asuth]
1231218 remove child process pointers like nsIDocument from ServiceWorkerManager NEW
1231220 remove service worker update propagation NEW
1239113 about:serviceworkers should fire update in current process when possible REOPENED
1314658 Update the security check in NeckoParent::GetValidatedAppInfo NEW
1360255 Add a test for loading a service-worker managed document in a new process NEW :Nika Layzell
1428130 remove cookie permission preload after service worker code checks storage access in parent process. NEW
1429805 display service worker console messages on related windows in different child processes NEW
1432311 network monitor cannot show network requests form a service worker running in a different process NEW
1456995 enable e10s service workers pref on nightly NEW
1462460 [meta] green up service worker tests with e10s pref flipped NEW
1470266 setup a sw-e10s automation branch to run tests with pref flipped NEW

14 Total; 14 Open (100%); 0 Resolved (0%); 0 Verified (0%);


Shipping for web content on Boot2Gecko (aka Firefox OS) (bug 1207265)

No results.

0 Total; 0 Open (0%); 0 Resolved (0%); 0 Verified (0%);


Shipping for Gaia (bug 1131322)

No results.

0 Total; 0 Open (0%); 0 Resolved (0%); 0 Verified (0%);


Things we likely won't get to in the first release supporting Service Workers (bug 1173500)

No results.

0 Total; 0 Open (0%); 0 Resolved (0%); 0 Verified (0%);


Demos/examples