- From: Philipp Legner <notifications@github.com>
- Date: Fri, 05 Aug 2016 10:28:52 -0700
- To: slightlyoff/ServiceWorker <ServiceWorker@noreply.github.com>
Received on Friday, 5 August 2016 17:29:28 UTC
We currently use the `Accept` header to determine if a browser supports WebP, and to change our response on the server. However, fetch() requests always send `'*/*'` by default, so our implementation would fail. Of course, we could manually override the `Accept` header as `fetch(url, {headers: {Accept: 'img/webp'}})`, however client side WebP detection is quite clunky (and we might also need some other parts of the `Accept` header). Similarly, we could save the original `Accept` header to a cookie or session variable and use it as fallback, but this behaviour seems quite fragile and hacky. Is there/will there be a way to send all default browser request headers with `fetch()`? --- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/slightlyoff/ServiceWorker/issues/945
Received on Friday, 5 August 2016 17:29:28 UTC