[w3c/ServiceWorker] Cache.addAll() and .add() needs to accept an init argument to use for fetch() (#1233)

`Cache.addAll()` is not as useful if it doesn't take an `init` argument that `fetch()` needs to fetch correctly in some cases. `addAll()` uses `fetch()` internally and `fetch()` is overly conservative with credentials defaulting to `'omit'` which causes a fetch failure while using web authentication. Currently the only way to work around this is to unroll the `addAll()` function for the sole reason to pass the more user friendly `{'credentials': 'same-origin'}` argument to `fetch()`. If `addAll()` would accept an init structure then then the init can be passed to `fetch()`.
Please change `addAll()` and `add()` to accept an optional `init` argument to use for `fetch()`: `addAll(requests, init)`.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/1233

Received on Sunday, 26 November 2017 00:32:02 UTC