service_workers_1 library Null safety
Service Workers Nightly
- The interface provides a persistent storage mechanism for [Request] / [Response] object pairs that are cached in long lived memory. How long a Cache lives is browser dependent, but a single origin's scripts can typically rely on the presence of a previously populated Cache. Note that the interface is exposed to windowed scopes as well as workers. You don't have to use it in conjunction with service workers, even though it is defined in the service worker spec. [...]
- The interface represents the storage for Cache objects. [...]
- The interface represents an executable context such as a Worker, or a SharedWorker. Window clients are represented by the more-specific WindowClient. You can get /WindowClient objects from methods such as Clients.matchAll() and Clients.get().
The interface provides access to Client objects. Access it via
self.clients] within a service worker.
The interface extends the lifetime of the
activateevents dispatched on the global scope as part of the service worker lifecycle. This ensures that any functional events (like FetchEvent) are not dispatched until it upgrades database schemas and deletes the outdated cache entries. [...]
The interface of the Service Worker API represents the event
object of a
messageevent fired on a service worker (when a message is received on the ServiceWorkerGlobalScope from another context) — extends the lifetime of such events. [...]
This is the event type for fetch events dispatched on the
service worker global scope. It contains information about the
fetch, including the request and how the receiver will treat the
response. It provides the
event.respondWith()method, which allows us to provide a response to this fetch.
- The interface of the Service Worker API provides methods for managing the preloading of resources with a service worker.
- Secure contextThis feature is available only in secure contexts (HTTPS), in some or all supporting browsers. [...]
- The interface of the Service Worker API provides an object representing the service worker as an overall unit in the network ecosystem, including facilities to register, unregister and update service workers, and access the state of service workers and their registrations. [...]
- The interface of the Service Worker API represents the global execution context of a service worker. [...]
- The interface of the Service Worker API represents the service worker registration. You register a service worker to control one or more pages that share the same origin. [...]
- The interface of the ServiceWorker API represents the scope of a service worker client that is a document in a browsing context, controlled by an active worker. The service worker client independently selects and uses a service worker for its own loading and sub-resources.