client-hints-infrastructure icon indicating copy to clipboard operation
client-hints-infrastructure copied to clipboard

Define Critical-CH Restart logic more rigorously.

Open arichiv opened this issue 1 year ago • 5 comments

We need a formal way to indicate the entire navigation needs to be restarted from the top of the redirect chain.

arichiv avatar Jun 06 '23 17:06 arichiv

Should Critical-CH restarts be limited to idempotent requests (or even just GET)?

eportis-cloudinary avatar Jun 23 '23 21:06 eportis-cloudinary

Should Critical-CH restarts be limited to idempotent requests (or even just GET)?

Per https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#retry-limits, it should be limited to just GET. I'm not sure what the Chromium implementation does tho.

miketaylr avatar Jun 26 '23 04:06 miketaylr

Per https://github.com/WICG/client-hints-infrastructure/blob/main/reliability.md#retry-limits, it should be limited to just GET. I'm not sure what the Chromium implementation does tho.

I guess we should verify there are tests to that effect..

yoavweiss avatar Jun 26 '23 05:06 yoavweiss

Chrome is actually limiting retries to once per origin per request. So if you have a chain like a.com -> b.com -> c.com your maximum retry chain length can look like a.com -(retry)> a.com -> b.com -(retry)> a.com -> b.com -> c.com -(retry)> a.com -> b.com -> c.com.

arichiv avatar Jun 26 '23 11:06 arichiv

Also the current spec checks the Critical-CH on the result of creating navigation params by fetching, which is after all redirects. So if we also want to restart the request in the middle of redirects (e.g. for a 302 redirect response with Critical-CH), perhaps we should check Critical-CH during the while loop for redirects in creating navigation params by fetching and restart the loop.

hiroshige-g avatar Jun 10 '24 18:06 hiroshige-g