Add original URLs to history #13

Closed
opened 2022-11-15 20:01:41 +00:00 by Bauke · 1 comment
Owner

One unfortunate thing about using onBeforeNavigate is that the original URLs aren't recorded in the browser history. Fortunately, there is a history API that should enable adding those URLs manually.

Ideally the original URL gets added to the history so that you can use the back button to manually bypass a redirect more easily.

One unfortunate thing about using onBeforeNavigate is that the original URLs aren't recorded in the browser history. Fortunately, there is [a history API](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history) that should enable adding those URLs manually. Ideally the original URL gets added to the history so that you can use the back button to manually bypass a redirect more easily.
Bauke added this to the Version 0.2.0 milestone 2022-11-15 20:01:41 +00:00
Bauke added the
Enhancement
label 2022-11-15 20:01:41 +00:00
Bauke self-assigned this 2022-11-15 20:01:41 +00:00
Author
Owner

Although adding URLs to the history is possible, it doesn't add them to the Back button's history.

A different way I did manage to get it working was using onCommitted instead of onBeforeNavigate, however this degraded the experience a lot because now pages would start loading before being redirected, and in the worst case a page would have finished loading entirely and then get redirected.

So for now I'm not gonna do this.

Although adding URLs to the history is possible, it doesn't add them to the Back button's history. A different way I did manage to get it working was using `onCommitted` instead of `onBeforeNavigate`, however this degraded the experience a lot because now pages would start loading before being redirected, and in the worst case a page would have finished loading entirely *and then* get redirected. So for now I'm not gonna do this.
Bauke closed this issue 2022-11-16 11:18:27 +00:00
Bauke added the
Not Implemented
label 2022-11-16 11:18:33 +00:00
Sign in to join this conversation.
No description provided.