From 59f64dd361ed22deb96b42941272afe787800938 Mon Sep 17 00:00:00 2001 From: Cyrille Tuzi Date: Sun, 30 Dec 2018 14:56:44 +0100 Subject: [PATCH] docs(service-worker): update service worker configuration doc (#27868) PR Close #27868 --- aio/content/guide/service-worker-config.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aio/content/guide/service-worker-config.md b/aio/content/guide/service-worker-config.md index 662abdeeaf..fefb619503 100644 --- a/aio/content/guide/service-worker-config.md +++ b/aio/content/guide/service-worker-config.md @@ -90,6 +90,8 @@ The `installMode` determines how these resources are initially cached. The `inst * `lazy` does not cache any of the resources up front. Instead, the Angular service worker only caches resources for which it receives requests. This is an on-demand caching mode. Resources that are never requested will not be cached. This is useful for things like images at different resolutions, so the service worker only caches the correct assets for the particular screen and orientation. +Defaults to `prefetch`. + ### `updateMode` For resources already in the cache, the `updateMode` determines the caching behavior when a new version of the app is discovered. Any resources in the group that have changed since the previous version are updated in accordance with `updateMode`. @@ -98,6 +100,8 @@ For resources already in the cache, the `updateMode` determines the caching beha * `lazy` tells the service worker to not cache those resources. Instead, it treats them as unrequested and waits until they're requested again before updating them. An `updateMode` of `lazy` is only valid if the `installMode` is also `lazy`. +Defaults to the value `installMode` is set to. + ### `resources` This section describes the resources to cache, broken up into three groups. @@ -141,7 +145,7 @@ Occasionally APIs change formats in a way that is not backward-compatible. A new `version` provides a mechanism to indicate that the resources being cached have been updated in a backwards-incompatible way, and that the old cache entries—those from previous versions—should be discarded. -`version` is an integer field and defaults to `0`. +`version` is an integer field and defaults to `1`. ### `cacheConfig` This section defines the policy by which matching requests will be cached.