davidben / http-client-hint-reliability

Other
4 stars 2 forks source link

Should there be more than one restart per origin within a navigation? #5

Open amtunlimited opened 2 years ago

amtunlimited commented 2 years ago

Step 2 of the Critical-CH restart procedure says (emphasis my own):

If the response was already the result of a retry, ignore the Critical-CH header and continue processing the response as usual.

The definition of "the result of a retry" is a little vague (perhaps intentionally so) and I would contend that any response from the same origin within a navigation is the result of a retry, because the client hint storage was changed.

This could mesh well with issue #4 as well (although the no-web-platform-spec bit is still an issue)

davidben commented 2 years ago

It wasn't meant to be vague, and that wasn't the intended interpretation. By "a retry", I meant specifically retry in step 4. I.e. if this response was in response to a retried request, don't keep retrying.

I think that's the most natural, as headers are per-resource. So, as a per-resource mechanism, it makes sense to be part of a single request/response flow.

Since the Accept-CH is origin-wide, it probably wouldn't be harmful to make it per-origin per se, but it might constrain more complex client hint policies, and seems more complex. Not sure. What's the reason to want it per-origin?