SwChangeDetectionConfig
Index
Properties
Properties
Optionalignore
ignore?: SpeedKitRule[]
Pages to leave out of the change detection.
Use this where a redirect is expected and says nothing about the cached page being out of date. A shop that sends visitors from the landing page to their local store, for example, redirects every time the store cookie is set, and there is nothing to revalidate.
swChangeDetection: {
ignore: [{ pathname: '/', cookie: { selectedStore: /.+/ } }],
}
A rule matches anywhere a redirect touches, not only the page it starts on, so a known target
like { pathname: '/login' } excludes every redirect leading there.
Optionalreport Only
reportOnly?: boolean
Only reports what the Service Worker finds instead of revalidating.
While this is on, a finding is written to the changeReport beacon and no cached page is
dropped, so the detection can be judged before it is allowed to invalidate anything.
Configures the change detection Speed Kit's Service Worker runs on its own.
Pass
trueinstead to switch revalidation on, orfalseto turn the detection off entirely.