You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 21, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 21, 2026. It is now read-only.
I'm somewhat hesitant to raise this bikeshed, but #82 (comment) made me think it. Should it be named appHistory?
Perhaps appSession would reflect things a tiny bit better? (I guess the one potential confusing thing here is that it's not 1:1 with sessionStorage, but appHistory is not 1:1 with history either.)
Yeah, app history is more of a "least bad" name. The predecessor proposal was called "navigator" and lived on window.history.navigator, but I thought that was pretty confusing.
"Session" seems like it might be the right spec-level concept to encompass "history and navigation", but it feels like the wrong web-dev-facing concept. When web devs talk about "sessions" it's mostly about user sessions, being logged in and out, etc., and not about history and navigation.
Between "history" and "navigation" I think most of the complexity (for web developers) comes in with history, so that's why I went with window.appHistory instead of window.appNavigator or window.historyAndNavigation or something. That does lead to confusion like #82 (comment) but that seems like an OK-ish price...
I'm happy to leave this open in case we come up with something brilliant. But my instincts are to stick with the inertia behind the current name, despite it not being perfect.
Reacted by Anthony Frehner, Kenneth Rohde Christiansen and Tom Wilkinson
appSession: For me this is confusing, because it doesn't necessarily indicate it has to do with history or navigation or the URL, which are things that I think of when I think of this API.
window.navigator.navigation and window.navigator.history: I'm shaking my fist at the folks who got to navigator, because I think it has more to do with the User Agent than "navigation." But given that the existing window.navigator has little to do with navigation or history, I don't think it's right to hang this new API off that object.
navigationHistory: I think this is largely equivalent to appHistory, but not better.
navigationStack: People have quibbled about whether history is in fact a 'stack' (technically from a data structure POV, it's not), so I think I'd like to get away from this nomenclature.
Well, I suppose the "app" part is signifying to importance of same-origin history for this API - most of the new functionality has to do with enabling an "app" to inspect and modify its own history. So I'm not totally opposed to "app" being in the name.
But I do agree that if I had to pick one word to represent all this, it would be "navigation". Navigation to me represents the action that the API enables, "history" represents the state left behind by that action.
Not to throw another wrench, but other good words: "page", "view," "site". For instance, pageHistory (or pageNavigation), as opposed to appHistory, if no one likes the word app.
@jakearchibald, @annevk, @smaug---- and I discussed this today. @smaug---- especially was of the opinion that this API is largely about navigation, and less so history. We tentatively thought that maybe just the name window.navigation (and spec title "Navigation API") would work:
awaitnavigation.navigate(url);constentries=navigation.entries();constcurrentEntry=navigation.current;// or currentEntry? or now?awaitnavigation.transition.finished;awaitnavigation.back();awaitnavigation.goTo(key);
This seems pretty OK to me. What do other folks think?
Reacted by S.A.N, Anne van Kesteren, Jake Archibald, Mark and Quint Guvernator
Are there any chances of library/global conflicts? I tried doing some searching to see if anything puts navigation onto global/window but at first glance couldn't find anything.
It's always hard to say, but generally on the web platform we haven't had many such conflicts. (The only one I'm aware of is when TC39 tried to introduce global, resulting in the current globalThis name.) We could also minimize the risk by making the global [Replaceable].
Navigation is not a bad name, though it seem a lot more natural to call the-stateful-thing-you-call-navigate-on navigator, which — oh, wait, it seems that’s taken? perhaps this is not such a good name. :)
Can’t say I would look forward much to mistyping and misreading this all the time, and I’m a native speaker, so it may be more troublesome for others. AppHistory seemed fine to me — FWIW, the moment I saw that name, I knew what it was gonna be about, though I couldn’t nec explain why?
Of course this won’t make or break it but I do hope folks land on anything-but-navigation (because of navigator I mean — it seems fine conceptually).
Unfortunately, I agree that "Navigation" may be too similar to the existing Navigator object (which ironically doesn't seem to have much to do with navigating). Perhaps "ApplicationState"?
Activity
domenic commentedon Mar 19, 2021
Yeah, app history is more of a "least bad" name. The predecessor proposal was called "navigator" and lived on
window.history.navigator, but I thought that was pretty confusing."Session" seems like it might be the right spec-level concept to encompass "history and navigation", but it feels like the wrong web-dev-facing concept. When web devs talk about "sessions" it's mostly about user sessions, being logged in and out, etc., and not about history and navigation.
Between "history" and "navigation" I think most of the complexity (for web developers) comes in with history, so that's why I went with
window.appHistoryinstead ofwindow.appNavigatororwindow.historyAndNavigationor something. That does lead to confusion like #82 (comment) but that seems like an OK-ish price...I'm happy to leave this open in case we come up with something brilliant. But my instincts are to stick with the inertia behind the current name, despite it not being perfect.
kidwm commentedon Mar 21, 2021
How about
window.navigator.navigationorwindow.navigator.history?kenchris commentedon Mar 24, 2021
navigationHistory? navigationStack?
tbondwilkinson commentedon Mar 24, 2021
appSession: For me this is confusing, because it doesn't necessarily indicate it has to do with history or navigation or the URL, which are things that I think of when I think of this API.window.navigator.navigationandwindow.navigator.history: I'm shaking my fist at the folks who got tonavigator, because I think it has more to do with the User Agent than "navigation." But given that the existingwindow.navigatorhas little to do with navigation or history, I don't think it's right to hang this new API off that object.navigationHistory: I think this is largely equivalent toappHistory, but not better.navigationStack: People have quibbled about whether history is in fact a 'stack' (technically from a data structure POV, it's not), so I think I'd like to get away from this nomenclature.kenchris commentedon Mar 24, 2021
in appHistory, I am not sure what value "app" provides :-) at least "navigation history" provides a bit more clarification
tbondwilkinson commentedon Mar 24, 2021
Well, I suppose the "app" part is signifying to importance of same-origin history for this API - most of the new functionality has to do with enabling an "app" to inspect and modify its own history. So I'm not totally opposed to "app" being in the name.
But I do agree that if I had to pick one word to represent all this, it would be "navigation". Navigation to me represents the action that the API enables, "history" represents the state left behind by that action.
Not to throw another wrench, but other good words: "page", "view," "site". For instance, pageHistory (or pageNavigation), as opposed to appHistory, if no one likes the word app.
Yay295 commentedon Mar 24, 2021
In that case it would be
siteHistory, notpageHistory. A website can be composed of many webpages.uasan commentedon Mar 26, 2021
Better -
window.navigator.routerdomenic commentedon May 12, 2021
@jakearchibald, @annevk, @smaug---- and I discussed this today. @smaug---- especially was of the opinion that this API is largely about navigation, and less so history. We tentatively thought that maybe just the name
window.navigation(and spec title "Navigation API") would work:This seems pretty OK to me. What do other folks think?
frehner commentedon May 12, 2021
I like it.
Are there any chances of library/global conflicts? I tried doing some searching to see if anything puts
navigationonto global/window but at first glance couldn't find anything.domenic commentedon May 12, 2021
It's always hard to say, but generally on the web platform we haven't had many such conflicts. (The only one I'm aware of is when TC39 tried to introduce
global, resulting in the currentglobalThisname.) We could also minimize the risk by making the global[Replaceable].bathos commentedon May 12, 2021
Navigation is not a bad name, though it seem a lot more natural to call the-stateful-thing-you-call-navigate-on navigator, which — oh, wait, it seems that’s taken? perhaps this is not such a good name. :)
Can’t say I would look forward much to mistyping and misreading this all the time, and I’m a native speaker, so it may be more troublesome for others. AppHistory seemed fine to me — FWIW, the moment I saw that name, I knew what it was gonna be about, though I couldn’t nec explain why?
Of course this won’t make or break it but I do hope folks land on anything-but-navigation (because of navigator I mean — it seems fine conceptually).
(
ActualNavigator?)Yay295 commentedon May 12, 2021
Unfortunately, I agree that "Navigation" may be too similar to the existing Navigator object (which ironically doesn't seem to have much to do with navigating). Perhaps "ApplicationState"?
uasan commentedon May 12, 2021
Maybe - window.navigator.app?
59 remaining items
Bug 1758766 [wpt PR 33132] - App history API to navigation API rename…
Bug 1760181 [wpt PR 33182] - App history API to navigation API rename…
Bug 1760217 [wpt PR 33184] - App history API to navigation API rename…
Bug 1758714 [wpt PR 33129] - Adjust URL of Navigation History in META…
Bug 1758766 [wpt PR 33132] - App history API to navigation API rename…
Bug 1760181 [wpt PR 33182] - App history API to navigation API rename…
Bug 1760217 [wpt PR 33184] - App history API to navigation API rename…
Bug 1758714 [wpt PR 33129] - Adjust URL of Navigation History in META…
Bug 1758766 [wpt PR 33132] - App history API to navigation API rename…
Bug 1760181 [wpt PR 33182] - App history API to navigation API rename…
Bug 1760217 [wpt PR 33184] - App history API to navigation API rename…
Bug 1758714 [wpt PR 33129] - Adjust URL of Navigation History in META…
Bug 1758766 [wpt PR 33132] - App history API to navigation API rename…
Bug 1760181 [wpt PR 33182] - App history API to navigation API rename…
Bug 1760217 [wpt PR 33184] - App history API to navigation API rename…