Create Firefox Smart Bookmarks - gHacks Tech News

Create Firefox Smart Bookmarks

Firefox 3 changed the bookmarking system from a basic html powered system to using sqlite databases. One benefit of using databases is the possibility to run custom queries.

Three of so-called smart bookmarks are already available after installing Firefox 3: Most Visited, Recently Bookmarked and Recent Tags all make use of database queries to provide the user with dynamic results.

So what's possible with this technique besides those three default dynamic bookmark folders? Users could display all bookmarks that are tagged with a specific tag, display the latest ten pages that they visited on a specific domain or list the least visited bookmarks.

Many additional possibilities exist and it is just a matter of defining the database query correctly to produce the desired results.

The basics first. Database queries are added as normal bookmarks and placed in the location field instead of the usual address pointing to a resource. The name can be selected freely and database queries use the place:query syntax. Let's take a look at an example:

places query firefox

The above query is "place:queryType=0&sort=8&maxResults=10" uses the filters queryType, sort and maxResults.

  • queryType=0 will return history results
  • sort=8 will sort the bookmarks by visit count
  • maxResults=10 limits the results to ten bookmarks.

Other interesting parameters are:

  • sort=0 returns the natural bookmark order.
  • sort=1 from A to Z
  • sort=12 by date added
  • maxresults=0 show all results
  • queryType=1 queries the bookmarks
  • queryType=2 will return results from all locations
  • domain=string returns only results that match the domain name

The guys at the Mozillazine forum did a good job of listing the relevant queries and it would be redundant to simply copy and paste their work here.

Just head over to the forum and take a look at the queries. If you want to have a specific query and cannot get it to work let us know in the comments and we try to build it for you.

Advertisement

We need your help

Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.

If you like our content, and would like to help, please consider making a contribution:


Previous Post: «
Next Post: »

Comments

  1. Tin said on May 3, 2009 at 8:44 am
    Reply

    Found this while looking for a method of creating an “All Tags” listing (similar to the “Recent Tags” supplied in FF3).

    Simple really once I found a why to copy the built in one.
    place:sort=14&type=6

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

Please note that your comment may not appear immediately after you post it.