Web Browser Wednesday

The new Firefox 3 address bar is one of those things that you either love or hate, and it’s quite amazing how much buzz such a simple aspect of the browser can cause. The new address bar is often referred to as the AwesomeBar because of how useful it can be, but more officially it is considered the Smart Location Bar.

Why does the Smart Location Bar get so much attention? In most browsers the address bar only looks at the sites you’ve previously typed directly into the bar, but in Firefox 3 it also includes results from both your history and bookmarks. This kind of behavior definitely takes some getting used to, and it wasn’t until I had been using it for a few weeks that I really began to love it.

We’ve got a bunch of different things in store for you to today. To get the ball rolling we’re going to briefly explain how Firefox 3 calculates what results should be at the top of the address bar when you’re typing, and what should be at the bottom. Then we’ve got a bunch of tips on how you can tweak and alter various aspects of the location bar until it’s exactly what you want it to be.

–The Algorithm: Frecency–

frecency.pngFirefox 3 assigns a rank to every site that you visit, and it uses multiple criteria to do so. The two main things that factor into how a URL’s value is calculated are how often you visit that site in conjunction with when the site was visited. This value is often called the Frecency: frequency combined with recency.

That sounds simple enough, but as Mozilla’s documentation demonstrates there is a lot more to it. Bonuses are given to sites that you manually type into the address bar, bookmarks that you visit, and more. Plus more weight is given depending on whether you visited the URL in the last 4 days, 14 days, 31 days, or 90 days. All of this plays into what appears in the address bar when you start typing.

The good news is that you can essentially customize each aspect of the algorithm using about:config in the browser. If you pull up about:config and type frecency into the filter list you’ll find all of the different values associated with the algorithm. It’s helpful to know the formula used in the calculation because it will help explain what each of the different entries represent:

Visit Value = Bucket Weight * (Visit Bonus / 100)

The bucket weight values appear in in the about:config as firstBucketWeight, secondBucketWeight, and so on. These “buckets” correspond to the recency of your visit (4 days, 14 days, etc…) which can be adjusted with the firstBucketCutoff, secondBucketCutoff, etc… settings.

Visit bonuses are given to various URL’s depending on a variety of factors, including whether a site is bookmarked, whether it was visited by clicking a link, or whether it was visited by entering the address into the location bar. All of these values can be adjusted as well, and of them have the word “Bonus” on the end of them in the about:config frecency section.

–Deleting Entries & Resetting Stats–

clear private data.jpgAlthough the system seems overly complicated it’s pretty easy to mange what items appear. For example, I’ve read stories by several people saying that they don’t want results from their history showing up in the address bar because of questionable sites that they visit. Well, the results that are available are only those that are in your history, which means clearing out your history will wipe out those “questionable sites.”

You can do this in a variety of ways. If you want to wipe out your entire history (and therefore reset the stats) you can go to Tools -> Clear Private Data, and from there you can erase your browsing history among other things. Alternatively you can go to History -> Show All History where you can manage individual items, and you can also search through your entire history. Just select the items you want to remove and press the Delete key.

If you want a really fast way to remove items from your history you can use the… address bar! That’s right. Select an item from the address bar using the keyboard arrows, and then press the Delete key (Shift+Delete on a Mac) to see it get removed immediately.

–Removing History & Bookmarks–

If you don’t want the address bar searching both your history and bookmarks there is actually a quick fix. Open up the about:config, navigate to browser.urlbar.matchOnlyTyped, and change the value to true. Now the address bar will behave just like it did in Firefox 2 where it only searches those addresses you’ve typed into it.

–Removing Bookmarks–

Believe it or not you can prevent your bookmarks from showing up in the results without giving up the history results. Just open up the about:config and set places.frecency.unvisitedBookmarkBonus and places.frecency.bookmarkVisitBonus both to 0 (that’s the number zero). The next thing you’ll want to do is restart Firefox and clear your history. This is because Firefox has the frecency values stored, and without clearing the history your bookmarks will likely still show up.

Tip: If you want bookmarks appearing that you have visited only set the “unvisited” option to zero. That way your visited bookmarks will continue to show up as normal.

–Hide Unvisited Extension–

The Hide Unvisited add-on is similar to the method I described above for removing your bookmarks from the results, but it eliminates some of the hassle. What it does is set the following values in the about:config to zero:

  • places.frecency.unvisitedTypedBonus
  • places.frecency.unvisitedBookmarkBonus

After those have been set to zero it will erase the frecency values for the bookmarks that you haven’t visited before. This prevents you from having to wipe out your browser’s history in order to see the new values take effect.

This doesn’t, however, prevent your bookmarks from being displayed all together. This only affects those bookmarks that you haven’t visited since the last time you cleared your browser’s cache.

–Alter the Appearance–

The OldBar add-on for Firefox 3 won’t touch the address bar’s algorithm, but it will change the appearance to make the results look like they did in Firefox 2.


–Displaying Google Results–

We’ve supercharged the Firefox 3 address bar with our own homegrown CyberSearch extension. In a nutshell it lets you search Google and see the results right there in the address bar. It’s highly customizable and can make you a lot more productive.

cybersearch web.png

–Distinguishing the Types of Results–

If you want it to be easier to recognize the different types of results in the address bar you may have to look no further than this style designed for the Stylish extension.If you don’t mind diving into the CSS code you can (of course) customize the color scheme, too. With it results from tags will be highlighted in light yellow, bookmarks in light blue, and history items in light green. Similarly our CyberSearch extension has a built-in customization option so that you can pick what background color its results use, and so this works well with it.

address bar style.jpg

Thanks for the tip Mark! [via Ghacks]


Hopefully this article has helped you understand exactly how the Firefox 3 address bar functions, and how you can make it work for you. Be sure to checkout our other Firefox 3 tips, and let us know in the comments how you’ve gone about customizing the address bar.