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:
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