workbox-recipes
Summary
- Types
- Methods
Types
GoogleFontCacheOptions
Properties
- cachePrefix
string optional
- maxAgeSeconds
number optional
- maxEntries
number optional
ImageCacheOptions
Properties
- cacheName
string optional
- matchCallback
RouteMatchCallback optional
- maxAgeSeconds
number optional
- maxEntries
number optional
- plugins
WorkboxPlugin[] optional
- warmCache
string[] optional
OfflineFallbackOptions
Properties
- fontFallback
string optional
- imageFallback
string optional
- pageFallback
string optional
PageCacheOptions
Properties
- cacheName
string optional
- matchCallback
RouteMatchCallback optional
- networkTimeoutSeconds
number optional
- plugins
WorkboxPlugin[] optional
- warmCache
string[] optional
StaticResourceOptions
Properties
- cacheName
string optional
- matchCallback
RouteMatchCallback optional
- plugins
WorkboxPlugin[] optional
- warmCache
string[] optional
WarmStrategyCacheOptions
Properties
- strategy
- urls
string[]
Methods
googleFontsCache
workbox-recipes.googleFontsCache(
options?:
GoogleFontCacheOptions,
)
An implementation of the [Google fonts]https://developers.google.com/web/tools/workbox/guides/common-recipes#google_fonts
caching recipe
Parameters
- options
GoogleFontCacheOptions optional
imageCache
workbox-recipes.imageCache(
options?:
ImageCacheOptions,
)
An implementation of the [image caching recipe]https://developers.google.com/web/tools/workbox/guides/common-recipes#caching_images
Parameters
- options
ImageCacheOptions optional
offlineFallback
workbox-recipes.offlineFallback(
options?:
OfflineFallbackOptions,
)
An implementation of the [comprehensive fallbacks recipe]https://developers.google.com/web/tools/workbox/guides/advanced-recipes#comprehensive_fallbacks
. Be sure to include the fallbacks in your precache injection
Parameters
- options
OfflineFallbackOptions optional
pageCache
workbox-recipes.pageCache(
options?:
PageCacheOptions,
)
An implementation of a page caching recipe with a network timeout
Parameters
- options
PageCacheOptions optional
staticResourceCache
workbox-recipes.staticResourceCache(
options?:
StaticResourceOptions,
)
An implementation of the [CSS and JavaScript files recipe]https://developers.google.com/web/tools/workbox/guides/common-recipes#cache_css_and_javascript_files
Parameters
- options
StaticResourceOptions optional
warmStrategyCache
workbox-recipes.warmStrategyCache(
options:
WarmStrategyCacheOptions,
)
Parameters
- options