Skip to content

implement options to fetch #7

Open
@jimmywarting

Description

@jimmywarting
  • network-only: always download latest from network

  • cache-only: always load from cache storage (fail if not cached)

  • cache-first: load from cache if it exist, otherwise download, cache & load from network

  • network-first: always download latest from network, if it fail: use cache

  • fastest: Promise.race solution that loads from both cache and network, when the network completes, then it will also store it to cache

this ideas namely comes from https://googlechromelabs.github.io/sw-toolbox/api.html#handlers

there could also be some solutions that works with cache headers in the response...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions