-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent Navigation History Behavior Across Browsers with Resource URLs Using tabs.update()
#677
Comments
The behavior described for Chromium matches that engine's general handling of navigations. This behavior is described as a history manipulation intervention and was introduced in 2019. To the best of my knowledge other engines have not implemented this. EDIT: In today's meeting @Rob--W noted that Firefox also has some history manipulation intervention. |
FYI in Firefox it was implemented in https://bugzilla.mozilla.org/show_bug.cgi?id=1515073, with follow-ups in https://bugzilla.mozilla.org/show_bug.cgi?id=1645211 On Firefox's side, our preference is to keep Firefox's current behavior and to allow extensions to replace history entries with the According to @xeenon , the disappearance of history items in Safari is a bug. (see meeting notes for more discussion, pending review in #681). |
Thanks! We’re tracking this as a Safari bug rather than a WebKit issue. Bug reference: 134939755 |
Thanks for the responses! I now understand the differences in browser behavior, and it's good to know related issues are being addressed. I'll close this discussion. Appreciate the help! |
The following code handles navigation history differently across Firefox, Chrome, and Safari, and I'd like to know the expected behavior or whether we have a chance to define the expectation:
When running the above code:
test.html
like a normal web page. After navigating totest.html
, the user can go back to the previous page.test.html
like a normal web page but removes the previous page from the history if the user hasn't interacted with the previous pages since the tab was created.test.html
in the address bar.Which one is expected? Or do we have a chance to standardize the behavior across browsers, especially regarding the navigation history?
Demo
This is the demo of creating a new tab with example.com and then opening test.html bundled into the extension.
firefox.mov
chrome.mov
safari.mov
And this is the code I actually used in the above demo.
A use case
My Safari extension has a feature of redirecting to another app. Specifically, when the user tries to open a web page, the extension first navigates to a loading page bundled into the extension, and then the extension opens another app by running a native CLI command. However, opening the loading page causes Safari to delete the navigation history, preventing the user from returning to the previous web pages.
Yesterday, I received user feedback about this issue and realized that Firefox's way would work ideally for my extension. Therefore, I hope the browsers will be aligned with what Firefox does.
The text was updated successfully, but these errors were encountered: