w3c / navigation-timing

Navigation Timing
https://w3c.github.io/navigation-timing/
Other
116 stars 30 forks source link

Clarify spec and tests with respect to redirect info #158

Closed npm1 closed 2 years ago

npm1 commented 3 years ago

Currently the Fetch spec sets redirectCount to 0 if there are any cross origin redirects in the chain to navigate. However, there seems to be no special treatment for redirectStart/redirectEnd. So what this means is that per the spec they should be set if the navigation passes all TAO checks (is it entirely clear what this means?). However, we added a test (navigation-timing/nav2_test_redirect_chain_xserver_final_original_origin.html) where we check that even if TAO checks pass, as long as there is a cross origin redirect, the timestamps are not exposed. We need to reconcile the spec and the test.

noamr commented 3 years ago

The handling of redirectStart and redirectEnd happens in the FETCH spec, https://fetch.spec.whatwg.org/#finalize-and-report-timing. Yes, currently there is no special treatment for navigation with the redirect timing properties, they behave the same as regular resource. Was that in the original spec and disappeared, or was it something that existed only in the tests?

noamr commented 3 years ago

Actually from reading this again, navigation timing doesn't call finalize and report timing, which means that you are correct and this is missing in the spec - cross-origin redirects are not handled in the navigation timing spec. Assigning to myself.

noamr commented 2 years ago

This is now handled.