Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return a content-encoding header for resource timing and more #1796

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

guohuideng2024
Copy link

@guohuideng2024 guohuideng2024 commented Dec 13, 2024

The major change is to add content-encoding to response header list. This PR also adds description on how content-encoding is determined. (content negotiation)

The purpose is to pass such value to resource timing. Further details are available at
w3c/resource-timing#381.

Note: Per discussion at 12/05/2024 webPerWG call (https://docs.google.com/document/d/1mpFDrAWuV6IgvJ1KiL9sgIlcboC5uArtF8r_oqS1Sco/edit?tab=t.0#heading=h.af6v74wysf4m), we decided to allow arbitrary "content-encoding" value at "fetch". We only filter such value at client side, before passing the value to resource timing.

Related PR to modify resource timing specification:
w3c/resource-timing#411

(See WHATWG Working Mode: Changes for more details.)

Bug: w3c/resource-timing#381


Preview | Diff

@@ -5004,6 +5041,13 @@ steps:

<li><p>Let <var>type</var> be <var>blob</var>'s {{Blob/type}}.

<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong indentation

@@ -5105,10 +5152,19 @@ steps:
<li><p>Let <var>mimeType</var> be <var>dataURLStruct</var>'s
<a for="data: URL struct">MIME type</a>, <a lt="serialize a MIME type to bytes">serialized</a>.

<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong indentation

<li><p>Let <var>accept-coding</var> be the result of <a for="header list">getting</a>
`<code>Accept-Encoding</code>` from <var>request</var>'s <a for=request>header list</a>.
If <var>accept-encoding</var> is not null and the server selects one of the encoding options,
let <var>coding</var> be the selected encoding option; otherwise, i.e., no encoding is used,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can't have "let" in the middle of a phrase, see style in the rest of the document.

@annevk
Copy link
Member

annevk commented Jan 7, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants