docs(service-worker): add info about recovering from degraded Driver state (#32682)

Related to #31865

PR Close #32682
This commit is contained in:
Hoel IRIS 2019-07-29 16:42:25 +02:00 committed by atscott
parent c32b2ae0a8
commit 45c893d0e1
1 changed files with 9 additions and 0 deletions

View File

@ -207,6 +207,9 @@ There are two possible degraded states:
clean copy of the latest known version of the app. Older cached
versions are safe to use, so existing tabs continue to run from
cache, but new loads of the app will be served from the network.
The service worker will try to recover from this state when a new
version of the application is detected and installed (that is,
when a new `ngsw.json` is available).
* `SAFE_MODE`: the service worker cannot guarantee the safety of
using cached data. Either an unexpected error occurred or all
@ -216,6 +219,12 @@ network, running as little service worker code as possible.
In both cases, the parenthetical annotation provides the
error that caused the service worker to enter the degraded state.
Both states are temporary; they are saved only for the lifetime of the [ServiceWorker
instance](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerGlobalScope).
The browser sometimes terminates an idle service worker to conserve memory and
processor power, and creates a new service worker instance in response to
network events. The new instance starts in the `NORMAL` mode, regardless of the
state of the previous instance.
#### Latest manifest hash