WICG / soft-navigations

Heuristics to detect Single Page Apps soft navigations
https://wicg.github.io/soft-navigations/
Other
46 stars 6 forks source link

What's the epoch for events after a soft navigation #2

Closed andydavies closed 1 year ago

andydavies commented 1 year ago

Will the epoch for events after a soft navigation still be navigationStart, or will the epoch be reset and thus impact performance.now?

I'm assuming the epoch will still be navigationStart but it might be worth clarifying in the explainer

yoavweiss commented 1 year ago

If you're talking about the timeOrigin, it will not be modified by a soft navigation, and continue to be based on the landing navigation's start time. The way to consider the soft navigation's start time, is to take an entry's navigation ID, find the corresponding SoftNavigationEntry and look at its start time. One of the examples demonstrates that. Let me know if you think further clarifications are needed.

yoavweiss commented 1 year ago

Closing as I think I answered the question, but let me know if you think otherwise! :)