Re: [whatwg/fetch] Define a cache for H2 server push & friends (#354)

An interest side-effect of Chrome's H2 push implementation:

The H2 cache is stored at the connection level, so if the connection terminates the cache is lost. Because separate connections are used for credentialed vs non-credentialed requests, you can end up with unexpected H2 cache misses. Eg:

```js
// This resource is /sw.js
addEventListener('install', event => {
  event.waitUntil(async function() {
    const cache = caches.open('static-v1');
    cache.add('/script.js');
  }());
});
```

If you push `/script.js` along with `/sw.js`, you get a double-download of `/script.js`. `/sw.js` is fetched with credentials and `/script.js` isn't, so the non-credentialed request for `/script.js` is a cache-miss.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/354#issuecomment-281351847

Received on Tuesday, 21 February 2017 14:01:21 UTC