Emulate stale-while-revalidate?
stale-while-revalidate is an HTTP caching header that isn't widely honored by user agents, but might get some actual use "in the wild" in HTTP responses.
@igrigorik suggested that we might want to make sw-toolbox emulate stale-while-revalidate semantics when it's present. This would presumably only apply for any runtime strategy that involves a fetch(), but we'd have to give that more thought.
Browsers will probably implement this eventually (Chrome info) so this would need to work with and without native support.
stale-if-error would be interesting to implement too.
@jeffposnick I noticed at clients that having always fresh content is really important and that toolbox.fastest just isn't enough. I don't know what emulating stale-while-revalidate really means, but I created a stale-while-revalidate recipe with sw-toolbox. Would you be interested in a PR where I make this an actual strategy in sw-toolbox? Either way, what do you think about this approach? You can find it in this repo.