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

Clarify 103 response code support #339

Open
tunetheweb opened this issue Sep 30, 2024 · 1 comment
Open

Clarify 103 response code support #339

tunetheweb opened this issue Sep 30, 2024 · 1 comment

Comments

@tunetheweb
Copy link

Was asked if 103 early hints prevents navigation speculation. We tested and they don't (at least for prefetch), as it's the final response status that counts, but it could maybe be made clearer in the spec which has things like this:

A response response supports prefetch if the following steps return true:

  1. Let status be response’s status.
  2. Assert: status is not a redirect status.
  3. If status is not an ok status, then return false.
  4. Return true.

With a link to fetch's definition of ok-status:

2.2.3. Statuses
A status is an integer in the range 0 to 999, inclusive.
A null body status is a status that is 101, 103, 204, 205, or 304.
An ok status is a status in the range 200 to 299, inclusive.
A redirect status is a status that is 301, 302, 303, 307, or 308.

204 and 205 have special exclusions in the spec for prerendering, 304 is not yet supported as per #330, 101 is not really revelant for prerendering navigations, which leaves 103 as kind of unclear.

Given both 103 Early Hints and Nav Speculations are performance optimizations it would be good to be clearer about this.

@domenic
Copy link
Collaborator

domenic commented Oct 1, 2024

The issue is that the 103 is completely done with by the time we actually hit the navigation code; it's handled at a lower layer and that part of the spec never sees it.

So if a 103 somehow did get to that line in the spec, it would be correct to fail. Although that should never be possible.

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

No branches or pull requests

2 participants