workbox-precaching. PrecacheFallbackPlugin
PrecacheFallbackPlugin
allows you to specify an "offline fallback"
response to be used when a given strategy is unable to generate a response.
It does this by intercepting the handlerDidError
plugin callback
and returning a precached response, taking the expected revision parameter
into account automatically.
Unless you explicitly pass in a PrecacheController
instance to the
constructor, the default instance will be used. Generally speaking, most
developers will end up using the default.
Constructor
PrecacheFallbackPlugin
new PrecacheFallbackPlugin(config)
Constructs a new PrecacheFallbackPlugin with the associated fallbackURL.
Parameter |
|||||||
---|---|---|---|---|---|---|---|
config |
Object Values in
|