[w3c/ServiceWorker] Route showNotification() URLs through a fetch event? (#1161)

Right now (on Firefox and Chrome, at least) any `image`, `icon` and `badge` URL passed into showNotification() goes straight to the remote URL. It would be a much better experience if those requests were routed through the fetch event, so that we could use cached assets instead.

There is a work-around using `cache.match()` -> `res.blob()` -> `FileReader.readAsDataURL()`, but it's pretty inefficient since the lack of `URL.createObjectURL` (as removed in #688) means that every image is turned into a base-64 encoded string. Since the introduction of the `image` attribute, some of these images can be pretty huge.

-- 
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/1161

Received on Sunday, 11 June 2017 18:37:50 UTC