WICG / soft-navigations

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

Overlaps with Navigation API #16

Closed DerGernTod closed 10 months ago

DerGernTod commented 1 year ago

First of all, I think that having the ability to detect soft navigations and the correlated performance entries (web vitals) is very helpful. I'm just concerned that this overlaps too much with the Navigation API.

The Navigation API already provides entries for soft navigations. What exactly sets this spec apart? It feels like there's two things that solve the same problem now, especially since the Navigation API is still not living standard and could be enriched with the id that would correlate to the respective performance entries.

What is the purpose of this spec, especially compared to the Navigation API spec? What sets it apart?

yoavweiss commented 1 year ago

This doesn't really overlap with the Navigation API. This mechanism works well with the Navigation API as well as the history API to heuristically detect same-document navigations that should also be considered soft navigations. I'll add a section to the explainer outlining that.

yoavweiss commented 1 year ago

The Navigation API already provides entries for soft navigations.

If you're talking about NavigationHistoryEnrty, they provide a very different role than performance entries, and are not used for monitoring performance, but (IIUC) to enable control over navigations.

yoavweiss commented 1 year ago

FWIW, added a FAQ item that touches on this a bit in https://github.com/WICG/soft-navigations/pull/23

Let me know if there are still clarifications to be made.

yoavweiss commented 10 months ago

Closing as I believe this was addressed. Let me know if that's not the case.