News for hackers. Stuff that matters.
Re:Ask HN: Why are bookmarks second class citizens in browsers? by mg on Thursday August 18, 2022 @02:58AM (#32506221)
I don't know about Chrome, but in Firefox:

    Chrome now hides the bookmark bar by default
Not sure if it is the default, but my Firefox bookmark bar is always visible

    load common favorite news sites & blogs
    or load a window with all my productivity SaaS sites.
Shift+Click on a bookmark folder does that

    pick up where i left off on a research rabbit hole
Right-Click on one of the open tabs, click "select all tabs", right-click it again and click "Bookmark Tabs"

    i want it to be intuitive, efficient, and a prominent UX feature set
I'm a heavy user of bookmarks, and I am pretty happy with the state of bookmarks in Firefox.

What I do miss is a way to back them up from the command line. Firefox has a nice "Export Bookmarks to HTML" function, but it seems only available from the GUI, so there is no way to automatically backup the bookmarks in this nice format. I tried for a while to extract them from the SQLite DB FireFox stores them in, but the layout of that DB is pretty complex and bloated. Even after a bit of fiddling, I wasn't sure I really correctly got the data out.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by forgotpwd16 on Thursday August 18, 2022 @04:07AM (#32506713)
>so there is no way to automatically backup the bookmarks in this nice format

Firefox automatically backs up current bookmarks in lz4-compressed json under $profiledir/bookmarkbackups ($profiledir by default being like ~/.mozilla/firefox/xxxx.default). Can also autoexport to an HTML file by setting the following about:config prefs:

    browser.bookmarks.autoExportHTML => (boolean) true
    browser.bookmarks.file => (string) "/home/user/bookmarks.html"
If later pref is omitted then file will be $profiledir/bookmarks.html.

An issue with depending on this functionality is the backup happens when closing the browser.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by mg on Thursday August 18, 2022 @04:50AM (#32506963)
Yay, this is beautiful!

I had to set "browser.bookmarks.file" to "bookmarks.html". When omitting it, no file seems to be written.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by MasterYoda on Thursday August 18, 2022 @08:38AM (#32508756)
I may misunderstand! But how often is the bookmarks autoexported to html? Can you set the interval also?
Re:Ask HN: Why are bookmarks second class citizens in browsers? by forgotpwd16 on Friday August 19, 2022 @10:46AM (#32521641)
When closing the browser which may be an issue if someone keeps it always open.
Re:Ask HN: Why are bookmarks second class citizens in browsers? by mackrevinack on Thursday August 18, 2022 @03:22AM (#32506380)
tab stash is a pretty decent extension for quickly saving tabs and then restoring them later with one click

https://github.com/josh-berry/tab-stash

and unlike some other tab management extensions, it uses native bookmarks to store things which means you can still access the stashed tabs if you sync them to firefox mobile

Re:Ask HN: Why are bookmarks second class citizens in browsers? by bobajeff on Thursday August 18, 2022 @07:40AM (#32508136)
I like the idea of stashing tabs for later. But doesn't saving to bookmarks remove the History of the tab in the process?

That's what I think we need is a way to save the whole session of the tab. Not just the last page. Or maybe a way to graph multidimensional browsing history.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by dugite-code on Thursday August 18, 2022 @04:29AM (#32506851)
Oh Damn, that's actually quite useful. I really like it so far
Re:Ask HN: Why are bookmarks second class citizens in browsers? by RamblingCTO on Thursday August 18, 2022 @06:48AM (#32507711)
I use SessionSync for that, wonderful extension!
Re:Ask HN: Why are bookmarks second class citizens in browsers? by raghavbali on Thursday August 18, 2022 @05:30AM (#32507205)
this is sweet... thanks for the suggestion
Re:Ask HN: Why are bookmarks second class citizens in browsers? by cadwag on Thursday August 18, 2022 @09:06AM (#32509062)
I use histre (http://histre.com) to accomplish this functionality, not only within Firefox but across browsers, computers, and even colleagues.

My favorite feature is being able to save all tabs within a window, send a link to a co-worker, and have them open up all the tabs. It takes like 5 secs, end to end.

Best of all: if they have the histre extension as well, they can instantly open all the tabs at once and even see my highlights - it’s like being able to send a browser window state to another person!

Re:Ask HN: Why are bookmarks second class citizens in browsers? by kirubakaran on Thursday August 18, 2022 @10:08AM (#32509809)
Thanks! I work on https://histre.com/ and lot of users say that this feature is very useful to them. Many of them say that they use separate windows for each thing they're trying to do, and before you know it you have 10 different windows with a lot of tabs each. You can save the states of all of them and restore them selectively, as you said. https://histre.com/features/save-restore-tabs/

Bookmarks are too primitive imho. It is typically treated as just one link. It is useful to know the whole context around that. How did you get there? What else where you researching? Histre saves all that for you in a tree-style history.

On the other end of the manual work spectrum is elaborate note-taking about everything ("second brain"), keeping that organized enough to be useful etc, which takes too much time for nebulous benefit.

Histre takes care of all your knowledge management needs without making you do busywork.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by littlecranky67 on Thursday August 18, 2022 @04:00AM (#32506662)
> Not sure if it is the default, but my Firefox bookmark bar is always visible

you can set it to show/hide, but also to "Only show on new tab" which I use. That way I don't lose screen space, but and CMD+T (Ctrl+T on non-mac) will show my most important bookmarks in the bar right away.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by lasc4r on Thursday August 18, 2022 @01:11PM (#32512333)
This sounds nice, I just tried to do this and it doesn't work. Restarted FF and then my PC, still nothing when I open a new tab. It's too bad too, because I just realized how annoying my bookmarks bar is.

edit: It seems that if your new tab is set to 'blank page' it doesn't work, the default "firefox home' works though. For...reasons.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by j_4 on Thursday August 18, 2022 @05:51AM (#32507332)
Middle click on a bookmark folder will work as well, opening the tabs in the same window, which is what I want to do most of the time. Shift-click opens them in a new window.
Re:Ask HN: Why are bookmarks second class citizens in browsers? by stokesr on Thursday August 18, 2022 @06:26AM (#32507552)
I've been including it as step one in my work routine for over a year now, it's so much easier to pick work back up the next morning when I can be exactly where I left off the night before
Re:Ask HN: Why are bookmarks second class citizens in browsers? by alin23 on Thursday August 18, 2022 @03:22AM (#32506378)
I actually had to do this yesterday for a small fuzzy search through bookmarks thing I’m building for myself.

It was something like:

    SELECT url FROM moz_places WHERE id IN (SELECT fk FROM moz_bookmarks)
You can find more info on that database here: https://wiki.mozilla.org/Places/Places_SQL_queries_best_prac...
Re:Ask HN: Why are bookmarks second class citizens in browsers? by mg on Thursday August 18, 2022 @03:39AM (#32506500)
That only gives you the urls though.

You lose the names, the folder structure, the order and the keywords.

The HTML format FireFox can create is so nice, that for now I am willing to manually book them up to get that. Until someone can come up with a way to automate it.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by alin23 on Thursday August 18, 2022 @04:15AM (#32506773)
You can get names, folder, and ordered by date added in a nice JSON format:

    sqlite3 -json /tmp/places.sqlite '\
        SELECT p.url, b.title, (SELECT f.title FROM moz_bookmarks f WHERE fk IS NULL AND f.id=b.parent) AS folder \
        FROM moz_places p \
        INNER JOIN moz_bookmarks b ON b.fk=p.id \
        ORDER BY b."dateAdded"'
The full folder structure might be a bit more complex to get, I only have them on the top level and can’t experiment. Not sure what the keywords, never used such a thing.

I only rely on the title, and I’ll extract the text content of the link for a full text search through it because usually I’ll remember something from the contents and will try to search that instead of something from the title. I can’t predict what I’ll remember.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by nebalee on Thursday August 18, 2022 @09:30AM (#32509297)

  Right-Click on one of the open tabs, click "select all tabs", right-click it again and click "Bookmark Tabs"
Also, individual tabs can be added to the selection by Ctrl-Clicking them.
Re:Ask HN: Why are bookmarks second class citizens in browsers? by kal247 on Thursday August 18, 2022 @12:20PM (#32511641)
> What I do miss is a way to back them up from the command line.

I've written a Perl script that print bookmarks from Safari/Firefox/Chrome/Edge as <title><url><description>, but maybe it's too raw.

https://github.com/kal247/App-bookmarks

I might add other formatting options (HTML or Template Toolkit) if there's enough interest.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by mariusor on Thursday August 18, 2022 @03:57AM (#32506633)
> What I do miss is a way to back them up from the command line.

I think a solution can be easily scripted seeing as firefox stores its internal data in multiple sqlite files.

Re:Ask HN: Why are bookmarks second class citizens in browsers? by bryanrasmussen on Thursday August 18, 2022 @03:39AM (#32506505)
I think FF has some sort of responsive /platform layout thing going on with the browser, my FF developer in a crappy windows laptop has a slightly different layout where the top menu is hidden within a hamburger icon on the right and that is different on my bigger mac display. Which makes sense, I don't have a lot of real estate on this machine (need to tell the work it's not going to cut it I guess)
Re:Ask HN: Why are bookmarks second class citizens in browsers? by khorne on Thursday August 18, 2022 @03:52AM (#32506599)
Right-click the hamburger icon, toggle Menu bar and/or Bookmark toolbar.
Re:Ask HN: Why are bookmarks second class citizens in browsers? by forgotpwd16 on Thursday August 18, 2022 @03:55AM (#32506618)
>that is different on my bigger mac display

How? Maybe you're talking about Mac's global menu bar?

Re:Ask HN: Why are bookmarks second class citizens in browsers? by kkfx on Thursday August 18, 2022 @03:51AM (#32506595)
I do not know for Chrome BUT on Firefox you can normally ignore bookmarks in a bar or menu using a normally quicker and more effective direct bookmark search&narrow using the search bar starting with an asterisk.

Similarly the ampersand search in history.

We have nearly abandoned menu as UI elements because a CLI-alike search&narrow UI is better in general, just file managers remain lagging behind with their crappy UI...

Re:Ask HN: Why are bookmarks second class citizens in browsers? by ivolimmen on Thursday August 18, 2022 @07:11AM (#32507877)
For Firefox bookmarks: please look here for the query: https://github.com/IvoLimmen/mystart/blob/master/bookmarkimp...
Re:Ask HN: Why are bookmarks second class citizens in browsers? by timvisee on Friday August 19, 2022 @02:57AM (#32518192)
Yes!

And useful stuff like `*` in the address bar to search just bookmarks.