client-hints-infrastructure
client-hints-infrastructure copied to clipboard
Define Critical-CH Restart logic more rigorously.
We need a formal way to indicate the entire navigation needs to be restarted from the top of the redirect chain.
Should Critical-CH restarts be limited to idempotent requests (or even just GET)?
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.
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..
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.
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.