question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use local.storage API instead of bookmarks

See original GitHub issue

pros:

  1. possibilities on Android since Firefox for Android doesn’t have bookmark APIs.
  2. does not interfere with activity stream & bookmark sync

cons: maybe you need unlimited storage permission and break files into several onto sync

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:19 (7 by maintainers)

github_iconTop GitHub Comments

3reactions
ReDEnergycommented, May 18, 2018

Thanks for the feedback. Firefox Android and Firefox Desktop share the exactly same API… yes some things (mostly behaviors) might work a little different because on mobile you don’t have that much flexibility but other than that the same API and storage model is also available on Firefox mobile.

  1. It’s possible to use bookmark APIs on mobile to without any problem. I just have to completely rewrite the addon UI for session management and that’s the only reason I was not able to provide a working version on mobile. So even if it’s local.storage or bookmarks storage I have the same problem, need a good working UI for interacting with saved sessions.

  2. I don’t think bookmarks interfere with activity stream - If I’m not wrong those should only be based on local browsing history.

Regarding interference with bookmarks sync. That’s a little bit complicated I would say. I built this addon specifically to do that, to be able to save sessions as bookmarks because I think that It’s a great storage model and you have a lot of benefits from doing this. It’s not easy to change the whole purpose of the addon. The point is… bookmarked sessions should be only those sessions that you want to have them available forever or for a longer period of time. Some examples:

  • you want to buy something for your home (but not really right away, maybe in the near feature or whenever you have time/money) and do some research and then saved all that thing as a session
  • for students it’s a great research storage - sometimes you have projects that span over months and all your research links can be saved into these kinds of sessions and whenever you want to go back to them their right there
  • same for any working scenarios or whatever important links you might want to store for a longer time and not exactly come back to them the following day but even after a few months… they will still be there

That’s why I use bookmarks storage. Everything you specifically saved will be there for as long as you need them without worrying that they might be deleted. Once saved as bookmarks you have complete 100% control over them and only you decide when it’s time to delete them. Also, the addon is not really required to access them, you can do that using the internal Bookmark Manager. No matter what addons you may use in the future you’re bookmarks should be there and even if you change the browser you can import them elsewhere. All browsers already have a method of backup/exporting/importing of boomarks.

Now… auto-saved sessions - those that are stored in the History Tab. image These actually use the local.storage API because these are saved automatically and you don’t have complete control over them. When the limits (configured by you) are hit the oldest sessions will be automatically deleted.

Of course, you can use whichever you want. I don’t really use the auto-saved history at all. Some users might not use the bookmarks saving feature at all but only rely on the auto-saved sessions and so on.

So… in a few words, that’s why I don’t really want to use local.storage API that much. It’s very good for some things, but I consider the bookmarks to be the real critical difference between what other sessions managers do and what mine does.

I’m all for options, configuration, features and I will try to provide as much as possible withing next updates but removing bookmarks storage might definitely not be an option. Maybe a complete new addon, If I ever have time to write it.

1reaction
ReDEnergycommented, Aug 19, 2018

wow… that’s really awesome! Thanks a lot for point out. I had to do a really stupid hack to offer the lazy-loading functionality. I will definitely switch to the internal API with the next update (hope everything goes according to the plan and that a discarded tab still has the data I need)

Thanks for the bug list. Pretty sure many of those apply to this addon as well. Session Sync does not use the internal session-history that Firefox provides… the History Tab I implemented is similar but it’s addon specific implementation and has nothing in common with the default Firefox session tracking (various reasons such as the “clear history” functionality)

Sadly what I’m missing the most and probably won’t ever happen is the ability to add custom annotations to bookmarks like it was possible prior to WebExtensions. That would’ve solved so many issues like saving pinned state, mute state as well as any other custom data required for each tab. Sadly I will have to spit the data between bookmarks and something in localStorage (and that’s a pretty bad design solution)

There are a little to many bugs to check all of them right now but I will clearly go through all of them at some point. It’s really nice to have all of them in the same location.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using localstorage in bookmarks - javascript - Stack Overflow
As you describe in the question, localstorage belongs to a web origin. In your browser, bookmarked data: URIs have "null" origin.
Read more >
Build a Site Bookmark App with JavaScript by ... - Tutorialspoint
In this tutorial, we'll use JavaScript, CSS, and HTML to build a Site Bookmark app. Through the use of our browser's local storage,...
Read more >
Build a Site Bookmark App With JavaScript ... - GeeksforGeeks
In this article, we will create a Site Bookmark app using HTML, CSS, ... Local Storage is known as the web storage API...
Read more >
How to use Web Storage API? - DEV Community ‍ ‍
In this article, we are going to look at the different types of web storage such as Local Storage, Session Storage, and Cookies...
Read more >
Using local bookmarks in the ArcGIS API for JavaScript
Use localStorage with the Bookmarks widget in the ArcGIS API for ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found