Open amtunlimited opened 3 years ago
@abeyad @miketaylr
As a side note, I think Critical-CH-Restart
should be a boolean; I don't think a count doesn't make sense since Critical-CH should only result in up to one resend of the request.
@davidben since you own the spec (in a way), any thoughts?
@abeyad that's actually not quite true anymore. The Critical-CH restarts are now counted as part of the navigation redirect limit, so there could be a number of times.
That being said, there's a question of if the header should persist through a redirect chain, or just on the one "restarted" request. I was leaning towards just a boolean and not passed to the next redirect
better handling of still-missing headers
What kind of better handling were you envisioning? The server is equally obligated to respond to the missing headers in both requests. On the first request, if you send Critical-CH, the client may well choose not to restart, in which case the response is used as-is.
I suppose I was envisioning a server seeing that header and gracefully handling, vs not seeing it and assuming it will be dropped, but that's probably not a good precedent to set
Yeah, such a server would break if the client doesn't support the hint, or declined to send it for some reason.
Could be helpful for a number of reasons, including deduplication for analytics and better handling of still-missing headers.
Could call it
Critical-CH-Restart
or something, I'm thinking along the lines ofService-Worker-Navigation-Preload
.