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 Priority header #34399

Merged
merged 6 commits into from
Jul 11, 2024
Merged

HTTP Priority header #34399

merged 6 commits into from
Jul 11, 2024

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Jun 25, 2024

FF128 Adds support for RFC 9218 Extensible Prioritization Scheme for HTTP in https://bugzilla.mozilla.org/show_bug.cgi?id=1865040.

This spec includes a Priority header that can be sent in requests to provide a client hint about the relative priority that a resource should be sent by a server. This can be sent in any version of HTTP.

This is documented by this PR.

This is more than just the header as the RFC also adds HTTP/2 and HTTP/3 frames to allow a hop-to-hop update of the priority expectations after the header has been sent. However we don't document these so I'll add some comments as part of the body of this doc.

Related docs work can be tracked in #33847

PS The spec is here https://www.rfc-editor.org/rfc/rfc9218.html - it is really easy to read.

@github-actions github-actions bot added the Content:HTTP HTTP docs label Jun 25, 2024
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Jun 25, 2024
Copy link
Contributor

github-actions bot commented Jun 25, 2024

Preview URLs

(comment last updated: 2024-07-11 23:29:29)

@hamishwillee hamishwillee marked this pull request as ready for review June 28, 2024 06:17
@hamishwillee hamishwillee requested a review from a team as a code owner June 28, 2024 06:17
@hamishwillee hamishwillee requested review from Elchi3 and removed request for a team June 28, 2024 06:17
The HTTP below request below a possible follow on request for a CSS file.
The urgency is set to 2, indicating that the browser considers it to be quite high priority, but `i` is unset because the CSS file can't be handled incrementally.

```http
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note, I chose to use the HTTP/2 spec human readable format here. We should consider moving to it in future. Main reason though is that even though this can be used in HTTP/1.1 the main benefits come in HTTP/2 and 3. Also the spec uses it :-)

Copy link
Member

Choose a reason for hiding this comment

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

We don't have as nice syntax highlighting, but let's look at that again at some point. We might have the option for extending the block language as http2 or something.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For sure. Apparently it isn't too hard to extend with regexp.

@hamishwillee hamishwillee requested a review from bsmth July 5, 2024 02:35
Copy link
Member

@bsmth bsmth left a comment

Choose a reason for hiding this comment

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

Nice work! A couple of suggestions for you, but I'm leaving a +1 for when you've had a look!

Cheers 🙌🏻

Co-authored-by: Brian Thomas Smith <[email protected]>
@hamishwillee
Copy link
Collaborator Author

Thanks @bsmth - accepted all suggestions, some with minor changes.

@hamishwillee hamishwillee merged commit 5b929db into mdn:main Jul 11, 2024
8 checks passed
@hamishwillee hamishwillee deleted the ff128http_priority branch July 11, 2024 23:29
evelinabe pushed a commit to evelinabe/mdn-content that referenced this pull request Jul 12, 2024
* HTTP Priority header

* Update files/en-us/web/http/headers/index.md

* Update files/en-us/web/http/headers/priority/index.md

* Update files/en-us/web/http/headers/priority/index.md

Co-authored-by: Brian Thomas Smith <[email protected]>

* Apply suggestions from code review

Co-authored-by: Brian Thomas Smith <[email protected]>

---------

Co-authored-by: Brian Thomas Smith <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTTP HTTP docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants