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

I agree with your thinking here.

On document-insertion `<link rel="preload">` creates an entry in the fetch group's "preload cache" containing the request and a promise for the response. Should we do this for `no-store` responses too? Like all requests, their fetch goes through the service worker with a "default" cache mode.

Then before step 3 of https://fetch.spec.whatwg.org/#http-fetch: (with lots of hand-waving)

1. If the request mode is not "navigation":
  1. For each entry in the client's fetch group's "preload cache":
    1. If the request's url and method matches the entry's request
      1. Let preloadResponse be the result of waiting for the entry's response promise
      1. If preloadResponse is a network error (do we want to do this for 404s etc too?)
        1. Remove this entry from the "preload cache"
        1. Skip to the next iteration of the for-each
      1. For the vary header in preloadResponse, if request and the entry's request match up
        1. Remove this entry from the "preload cache"
        1. Return preloadResponse

> H2 server push

Can these be easily associated with a fetch group? I thought a single H2 connection would be used for multiple pages.

---
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-237508188

Received on Thursday, 4 August 2016 09:56:42 UTC