Skip to content
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

Store more information in history #1848

Closed
13 tasks
aartaka opened this issue Nov 4, 2021 · 5 comments
Closed
13 tasks

Store more information in history #1848

aartaka opened this issue Nov 4, 2021 · 5 comments
Labels
feature Feature requests. history Related to history handling.

Comments

@aartaka
Copy link
Contributor

aartaka commented Nov 4, 2021

[https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/history](The WebExtensions history API) requires the browser to store all the visits to a URL, with the respective timestamp and type of navigation. This hints at the fact that we can store more information in history than we currently do, and that we'll eventually need to do it.

The information to store (see the link above):

  • Every individual visit, with time and navigation type.
  • Downloads.
  • For history items (history.HistoryItem spec):
    • Number of times the URL was explicitly typed in set-url prompt.
    • Scroll position (broken ATM).
    • Zoom level.
  • Navigation types (taken from the WebExtensions history.TransitionType specs):
    • Link click.
    • Direct set-url prompt typing.
    • Bookmark.
    • iframes (loaded by the page or the user).
    • Command line passing.
    • Form submission.
    • Page reloading.
    • Keyword search (what? something Firefox-specific here)

More so, this spec requires history items to be easily deletable. This can be problematic with our immutable history.

There are obviously more things we can add to our history (see Tausher&Greenberg for an exhaustive list of things like semantic namespaces for history and other exciting stuff), but those changes are what every other major browser has and provides to its extensions. Thus, the changes listed above are first things to improve in our history.

@aartaka aartaka added the feature Feature requests. label Nov 4, 2021
@Ambrevar
Copy link
Member

Ambrevar commented Nov 5, 2021

I'm confused by

There are obviously more things we can add to our history (see Tausher&Greenberg for an exhaustive list of things like semantic namespaces for history and other exciting stuff), but those changes are what every other major browser has and provides to its extensions.

Are you saying that major browsers have semantic namespaces?

@Ambrevar
Copy link
Member

Ambrevar commented Nov 5, 2021

Off the top of my head, I remember that we can store arbitrary data to our history entries, so most of this should be easy, no?

As for entry deletion, do you know an example where it would be really needed?

@aartaka
Copy link
Contributor Author

aartaka commented Nov 5, 2021

I'm confused by

There are obviously more things we can add to our history (see Tausher&Greenberg for an exhaustive list of things like semantic namespaces for history and other exciting stuff), but those changes are what every other major browser has and provides to its extensions.

Are you saying that major browsers have semantic namespaces?

Sorry, I've been unclear. What I mean is that the linked paper has some insights for features that even major browsers don't have. The list above the reference to the paper, though, is standardized and all the Chromium- and Gecko-based browsers should have it.

@aartaka
Copy link
Contributor Author

aartaka commented Nov 5, 2021

Off the top of my head, I remember that we can store arbitrary data to our history entries, so most of this should be easy, no?

Yes. The only thing that puzzles me is how to store visits, as right now this is only represented as implicit-visits counter, while it should be a collection of visit objects with their own properties. How and where to implement it and where to add it are relatively non-trivial questions.

As for entry deletion, do you know an example where it would be really needed?

Extensions that rely on history WebExtensions API can use it for whatever reason they want it. The mere fact of this API existence is problematic there -- The Law of Implicit APIs ensures that if it exists then it's used by someone. While we can diverge from the standard and error out on history deletion when it's not allowed, it's not nice to existing extensions.

@aadcg
Copy link
Member

aadcg commented Feb 10, 2025

No longer important, due to #3598.

@aadcg aadcg closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature requests. history Related to history handling.
Development

No branches or pull requests

3 participants