Service workers are a new browser feature that provide event-driven scripts that run independently of web pages. Unlike other workers, service workers can be shut down at the end of events, note the lack of retained references from documents, and they have access to domain-wide events such as network fetches.
Service workers also have scriptable caches. Along with the ability to respond to network requests from certain web pages via script, this provides a way for applications to “go offline”.
Service workers are meant to replace the (oft maligned) HTML5 Application Cache. Unlike AppCache, service workers are comprised of scriptable primitives with an extensive use of Promises that make it possible for application developers to build URL-friendly, always-available applications in a sane and layered way.
To understand the design and how you might build apps with service workers, see the explainer document.
For the nitty-gritty of the API, the draft W3C specifications are authoritative. Service Workers Nightly is a living document. Service Workers 1 is a subset of the nightly version that is advancing toward a W3C Recommendation. For implementers and developers who seek all the latest features, Service Workers Nightly is a right document that is constantly reflecting new requirements. For version 1, contributors plan to focus on fixing bugs and resolving compatibility issues without including new features from the nightly version.
Updates to the spec must reference resolved issues marked
To make edits to the design, please send pull requests against the Nightly spec on the master branch. We use bikeshed. So, change
docs/index.bsand submit it with the corresponding bikesheded
The W3C Web Mobile Group have defined a series of use-cases where service worker is particularly useful. You can help by adding more use cases, draft implementation code, or even working examples once browsers support the required APIs.
This is to explain how we use labels and milestones to triage the issues. Note: This is a draft, suggestions for improvements are welcomed.
Risk labels for impacts MVP issues