• ARTICLES
SEARCH

How-To Geek

How to Create Custom Smart Bookmarks Folders in Firefox

image

Have you ever wondered how the “Most Visited” bookmarks folder included with Firefox works? It’s not just a special-cased folder – it takes advantage of the Places database introduced in Firefox 3, and you can create your own smart bookmarks.

Firefox’s Places system stores your bookmarks and history in an SQLite database. Firefox includes a powerful query: syntax for working this this database, but this feature is all but hidden by default.

Saving a Search

Firefox exposes a single way of creating a smart folder by default. To get started, open the Library window by selecting the Bookmarks or History option in the menu.

image

Perform a search using the search box in the Library window. You can search both page titles and page URLs – for example, type “How-To Geek” to find all pages with How-To Geek in their title or type “howtogeek.com” to find all pages on the How-To Geek website.

image

You can have the smart bookmark search your bookmarks or history. After selecting Bookmarks or History, click the Save button and provide a name to save your search as a smart bookmark folder.

image

Firefox creates the bookmark folder in your bookmarks menu by default, but you can place it anywhere you like – for example, on your bookmarks toolbar.

image

Firefox automatically updates the smart bookmark folder – it’s just a database query, like a smart playlist in iTunes. If you’ve been following along, you now have a smart bookmark folder that displays the pages you’ve recently visited on How-To Geek.

image

Using an Extension

To get at the advanced functionality, you can write places URIs yourself – but most users will probably want an easy-to-use graphical interface. Mozilla doesn’t provide one, so you’ll have to install an extension like SearchPlaces.

After you install the extension and restart Firefox, you’ll see a new SearchPlaces option in your Bookmarks menu.

image

SearchPlaces provides a graphical interface for creating new smart bookmarks and editing existing ones. It exposes much of the power left out of Firefox’s default interface.

image

SearchPlaces offers a lot of options for constructing your Places URI. For example, here we’re searching for pages containing the word “Android” that have been visited between 10 and 20 times. We could also specify a time range the web pages were visited between, although this is a bit complex to do – you have to specify a number of seconds from a relative time.

However, you can easily specify “today” as a time range. Set the relative time to “Midnight this morning” and enter “0” as the time.

image

To edit a smart bookmark folder that comes with Firefox, select it and click the Edit button.

image

SearchPlaces shows you each smart bookmark’s place: URI. Firefox hides these in the default interface – presumably to avoid scaring inexperienced users.

image

Writing Places URIs

Mozilla provides a detailed guide to place: query URIs on the Mozilla Developer Network website. There are a wide variety of options that you can use to construct complex query URIs.

For example, let’s say we want to create a smart bookmark folder showing all the pages we’ve visited on How-To Geek today, sorted in alphabetical order. This is the query string we’d use:

place:terms=howtogeek.com&beginTimeRef=1&beginTime=0&sort=1

There are four parts to this query:

  • terms=howtogeek.com – Searches for the term “howtogeek.com”.
  • beginTimeRef=1 – The begin time is relative to midnight this morning.
  • beginTime=0 – The “0” is a special value that includes all results since the relative time. In this case, it matches all results since midnight this morning – that is, all pages visited today.
  • sort=1 – Orders results in alphabetical order.

Once you have a query URI, create a new bookmark from the Library window or Bookmarks menu.

image

Name the bookmark and use the place: URI as the bookmark’s address.

image

Due to an apparent bug, you can’t create a smart bookmark directly on the browser toolbar. Firefox will treat it like a normal bookmark instead of noticing the place: URI and treating it properly.

image

Create it elsewhere – such as in your bookmarks menu — and drag and drop it onto the toolbar. Firefox will notice it’s a smart bookmark.

image


Firefox’s Places database hides a lot of power – it could be a killer feature for some people, but most will never notice it’s there.

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Google+.

  • Published 04/22/12

Comments (7)

  1. cam2644

    Worthwhile info to make Firefox- still the best browser despite the Google/microsoft publicity- even more useful. Thanks

  2. Ryan

    thanks! And I thought I knew everything there was to know about FireFox. BTW FF12 is released now

  3. Grizzli Bear

    To complicated.
    just right click on the personnel bookmark toolbar, choose new folder, name the folder and drop all things you like in there. In side this folder you can nest more folders so you have a folder for various subjects.

    Much easier…..

    Another good add-on is multi row bookmarks, check it out

    Till next time….

  4. Dark Reality

    Wow, that’s pretty awesome. I actually have Firefox (Pale Moon) clear my history, so this is useless to me as I’m currently set up. If I enable my history and set it to something more generous, I can make use of this. I’m thinking XDA, I spend hours up there looking through apps, launchers, themes, and Android hacking guides.

  5. rockyjames

    Good to know about the How to Create Custom Smart Bookmarks Folders in Firefox

  6. Matthew Graczyk

    Another great post, Chris. iCrumz.com (my company) offers an alternate bookmarking platform. It’s cloud-based (and free) so that all your bookmarks are always available using any browser from any computer, mobile phone or tablet. It’s unique interface allows you to easily organize 100 or more bookmarks on a single webpage in an uncluttered way.

  7. John

    I recently stumbled on the tags feature and smart folder feature of firefox. I have probably a couple thousand links or more in my favorites. There’re many different kinds of folders. I created a “Tagged” folder and a “Non-Tagged” folder. In the “Non-Tagged” folder I wanted to put all of my links that’re not tagged yet. In the Tagged folder I wanted to put all my tagged links. Then I wanted to be able to create smart folders to dynamically sort the links. The problem I’m finding is I can’t nest smart folders. In other words, I cannot put a smart folder in a smart folder. Now, my thinking about all this might be wrong, but I envisioned having all my links in one place while viewing them in folders that dynamically update. But because smart folders cannot be embedded in each other, I am unable to do this.

    In essence, tags are just folders. They’re a quicker way to cross-reference a link in multiple categories. For example, if I have a link about Vitamin-K and want to put it in 3 different categories (Health, Vitamins, Food), I’d have to copy the link and paste it manually into each folder. In older versions of firefox, I would bookmark it into 3 separate folders. This involves a lot of clicking. With the tags system, I can just add “Tag:\Health, Tag:\Vitamins, Tag:\Food” to the tags field. I use “Tag:\” because Firefox 3 is unable to search for JUST tags, so by prefixing it I can acquire this ability. Additionally, I no longer have to explicitly place the bookmark in a specific folder. Rather I could just put ALL my bookmarks in a folder named “Tagged” – thus greatly simplifying it.

    Another feature I’d like to see is a way to add a bookmark to one of my (nested) smartfolders and have the tags for it set automatically according to the smartfolder parent. This would place the bookmark in my “Tagged” folder since smart folders aren’t actual folders – they’re virtual folders that’re technically a SQL query.

    I’m using Firefox 3.6.28.

Enter Your Email Here to Get Access for Free:

Go check your email!