Subject: [http-extensions] Define `Accept-CH` more precisely (#155)

From: HTTP issue updates <[email-masked]>
Date: Thu, 10 Mar 2016 21:55:20 -0800

The spec currently says that if a server sends `Accept-CH: DPR`, then the `DPR` header should be added "to all subsequent requests".

However it is (as far as I can tell) completely undefined what a "subsequent request" is. Does it affect only future requests to the server which sent the `Accept-CH` header? If the header is sent with the response during a document load, does it affect all requests coming from that document, no matter which server the request goes to?

Generally speaking, if a CDN which servers images has to send a `Accept-CH: DPR` header before it will receive any `DPR` headers, that means that the first image will have to be served without DPR information. This seems unfortunate since ideally the first image that a page loads is the most important image.

A better solution is that when a browser loads a "document" and receives a `Accept-CH` header in the response, that header would affect all the requests that are made from that document, no matter which server the request is going to. If desired, in the future we could add more complex syntax to `Accept-CH` which enables opting in to certain CH headers only for certain servers and/or only for certain resource types.

We could also add a header which enables a server to opt in to getting specific CH headers for all future requests to that same server. To for example allow an image server to opt in to certain headers even if the document-serving server has not yet adopted the `Accept-CH` header. But I'm not sure how popular such a solution would be given first-load the problem mentioned above.

---
Reply to this email directly or view it on GitHub:
https://github.com/httpwg/http-extensions/issues/155