Re: [whatwg/fetch] Return a `content-encoding` header for resource timing and more (PR #1796)

> Thanks for taking the time to pick this up. However, it doesn't seem like this addresses all the issues with #1742? I recommend studying the feedback on that PR.

Hi Anne! I think I should have put up some background information here.

1. You mentioned in #1742 that the spec must define how the value is determined. This PR is trying to do that. The value is a result of the "content negotiation" (determine what encoding should be used) so I tried to add that into the existing text.
Note that #1742 is a change similar to one for a previously added field `contentType`. But `contentEncoding` is very different, it's not an extracted MIME type, but a result of "content negotiation". So, this PR should be very different from #1742 

2. We originally thought that the filtering should happen at the "fetch" stage. But in the last web perf meeting Patrick brought up that the returned `contentEncoding` can be a proprietary value and that value is needed by service worker. So, the unfiltered value must be kept by the browser and the filtering should happen right before reported to resourceTiming.

https://docs.google.com/document/d/1mpFDrAWuV6IgvJ1KiL9sgIlcboC5uArtF8r_oqS1Sco/edit?tab=t.0#heading=h.af6v74wysf4m 

Therefore, in this `fetch` doc I didn't mention filtering. I mentioned "filtering" in the resourceTiming spec:
https://github.com/w3c/resource-timing/pull/411
And I am going to add more details about the filtering there.

Does this sound right to you? I am new to `fetch` and I may have missed a lot of things here. Thanks for your patience and guidance.
Guohui


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

Message ID: <whatwg/fetch/pull/1796/c2591183951@github.com>

Received on Tuesday, 14 January 2025 21:55:49 UTC