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

HTTP Early hints 103 - How are HTML spec and HTTP RFC differences resolved? #8960

Closed
hamishwillee opened this issue Feb 28, 2023 · 2 comments
Assignees

Comments

@hamishwillee
Copy link

The HTTPQG RFC for early hints is here: https://httpwg.org/specs/rfc8297.html while the HTML Living spec covers semantics here: https://html.spec.whatwg.org/multipage/semantics.html#early-hints

The bit that seems inconsistent is this from the RFC:

Aside from performance optimizations, such evaluation of the 103 (Early Hints) response's header fields MUST NOT affect how the final response is processed. A client MUST NOT interpret the 103 (Early Hints) response header fields as if they applied to the informational response itself (e.g., as metadata about the 103 (Early Hints) response).

But the spec says

Early-hint [Link](https://httpwg.org/specs/rfc8288.html#header) headers are always processed before [Link](https://httpwg.org/specs/rfc8288.html#header) headers from the final response, followed by link elements. This is equivalent to prepending the contents of the early and final [Link](https://httpwg.org/specs/rfc8288.html#header) headers to the Document's head element, in respective order.

That last sentence seems like it could potentially contravene the MUST NOT in the spec.

My perspective here is MDN documentation for the HTTP 103 header - trying to understand whether I need to capture the HTML spec behaviour here.

@noamr
Copy link
Contributor

noamr commented Feb 28, 2023

The key here is "Aside from performance optimizations".
Early hints only support preload/preconnect/modulepreload link types which are performance optimizations.

@hamishwillee
Copy link
Author

THanks very much. Hopefully captured something useful of this in mdn/content#24949. Closing.

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

No branches or pull requests

2 participants