igrigorik / http-client-hints

402 stars 24 forks source link

Expose Accept-Encoding as a Client Hint #69

Closed inian closed 7 years ago

inian commented 7 years ago

Brotli is already supported by Chrome, Firefox and MS-Edge in development. However, most websites using CDNs are un-able to take advantage of this at the moment. This is because CDNs normalise the accept-encoding header before sending it to the origin. I have tested Cloudflare and Cloudfront and both of them normalise the accept-encoding header to just "gzip".

It would be cool if the brotli support could be advertised as a Client-Hint to the server and advertising this header would of course be an opt-in via the Accept-CH meta tag.

igrigorik commented 7 years ago

The right solution here is to file bugs against the CDNs / servers that do this and get them to fix their normalization logic.. Emitting a new header with the value that's already advertised in Accept-Encoding is counter-productive.