The browser has a global history and a session history
"The History API provides access to the browser's session history (not to be confused with WebExtensions history) through the history global object.". -MDN
A browser's session history keeps track of the navigations in each tab, to support back/forward navigations and session restore. This is in contrast to “history” (e.g., chrome://history), which tracks the main frame URLs the user has visited in any tab for the lifetime of a profile. Chrome
Today I was playing around with the browser history stack in Hotwire Turbo. I was trying to navigate to a new page using something like this:
Turbo.visit('/blog/some-article', {'action' : 'replace'});
I figured the expected behavior for something like this is to "replace" whatever page you're on in the stack with the new page. So I went to "History" in the Firefox menu and never saw my last entry replaced. Whenever I ran a Turbo.visit with replace, the old entry was still there. I thought Turbo was broke but it wasn't.
Evidently browsers have a session history, and a global history. Global history is every page you visited across all tabs. Thats in the menu at the top of firefox. A Turbo.visit() replace won't change the global history.
The session history however is the current tab you're on. The session history can be manipulated by the History Api. To see the session history in FireFox, click the <-- or the --> arrow, and hold it. It will drop down. Turbo.visit() will replace the history there.
Besides asking AI about it (sorry I'm human) the only other information I could find out about it was here: