Caching strategy picker

Three questions, one recommendation, with code.

Runs entirely in your browser. Nothing you enter is uploaded.

Pick a request type

How often does it change at the same URL?
Is a slightly old copy acceptable?
Is it private, a payment, or not a GET request?

Pick a request type, or describe your own with three questions:

  • How often does it change? Never at the same URL, sometimes, or every time.
  • Does it have to be fresh? Is a slightly old copy acceptable?
  • Is it private or a write? Logged-in data, payments, POST requests.

The picker explains its choice and gives you the code, in plain JavaScript and in Workbox form. The full explanation is in caching strategies.