How to add (or restore) Smart Bookmark folders in Firefox
Background
Smart Bookmark folders were added back in Firefox 3, after it switched from RDF to SQLite database , with Places system acting as a way for Firefox's front-end to interact with the database and manage the bookmarks.
This feature was present up until Firefox 63, where the folders are no longer created for new installs and profiles. Even the preference meant for restoring those folders is now gone.
Despite that, the Places query still works, so let's figure out how to add the smart bookmarks.
Add a bookmark
Since it is called Smart Bookmark, we need to add one in order for this to work:
- Press Ctrl/Cmd + Shift + B to open the bookmark toolbar
- Right click on the toolbar
- Click "Add Bookmark..."
The URL field is where the magic begins.
Most Visited
place:queryType=0&sort=8&maxResults=30
queryType=0
- search by historysort=8
- sort by visit count-
maxResults
- set max number of results to return (30 in this case)
Recent Tags
place:type=6&sort=14&maxResults=10
type=6
- results as tag query-
sort=14
- sort by last modified date, most recent first maxResults
- set max number of results to return
Recent Bookmarks
place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&queryType=1&sort=12&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10&excludeQueries=1
folder
- folder that is queriedqueryType=1
- search by bookmarkssort=12
- sort by date added, most recent first-
excludeItemIfParentHasAnnotation=livemark%2FfeedURI
- exclude item whose parent has this annotation from the bookmark query results (doesn't seem to work with Livemarks extension and is another bygone feature of Firefox). -
maxResults=10
- set max number of results to return -
excludeQueries=1
- excludes queries from the query results (queries as in searches?)
Reference
- https://developer.mozilla.org.cach3.com/en/Places_query_URIs
- https://forums.mozillazine.org/viewtopic.php?t=629560
- https://reddit.com/r/firefox/comments/2i4qcy/smart_bookmarks_a_quick_guide/
- https://wiki.mozilla.org/images/d/d5/Places.sqlite.schema3.pdf
- https://firefox-source-docs.mozilla.org/browser/places/index.html