workbox-recipes

    Summary

    Types

    GoogleFontCacheOptions

    Properties

    • cachePrefix

      string optional

    • maxAgeSeconds

      number optional

    • maxEntries

      number optional

    ImageCacheOptions

    Properties

    • cacheName

      string optional

    • matchCallback
    • 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
    • networkTimeoutSeconds

      number optional

    • plugins

      WorkboxPlugin[] optional

    • warmCache

      string[] optional

    StaticResourceOptions

    Properties

    WarmStrategyCacheOptions

    Properties

    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

    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

    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

    pageCache

    workbox-recipes.pageCache(
      options?: PageCacheOptions,
    )

    An implementation of a page caching recipe with a network timeout

    Parameters

    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

    warmStrategyCache

    workbox-recipes.warmStrategyCache(
      options: WarmStrategyCacheOptions,
    )

    Parameters

    We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.