4 February 2009 - 7:20Firefox 3.5 Location Bar Privacy

Thanks for installing/upgrading Hide Unvisited. This latest version is only for Firefox 3.5 and leverages the built-in privacy functionality of Firefox 3.5, so you don’t even need the add-on anymore. The add-on has already automatically uninstalled itself and set the preference as described below for you. :) But if you want another add-on to try, check out Enter Selects — pressing enter from the location bar will now automatically go to the first result.


User Privacy has made big steps with Firefox 3.5. First off it’s very simple to clear out the last hour of online shopping, medical researching or media browsing with “Clear Recent History.” This is much smarter than wiping out your entire history or not letting Firefox track any history just to prevent some pages from showing up in the Location Bar. Another big privacy feature is Private Browsing Mode [support.mozilla.org] (Panic Mode? ;) ), which starts a new browsing session where Firefox won’t track any history until you leave that mode.

Both these features affect the Location Bar because removing pages from your history stops you or someone else using Firefox and accidentally finding those pages when typing in the Location Bar.

One slight caveat is that by default, Firefox will suggest bookmarks from the Location Bar because you’ve added a star to the page and probably want to revisit it. This means even if you clear your browsing history, bookmarks will still show up when searching for pages.

Choose what Firefox 3.5 can suggest from the Location Bar

Choose what Firefox 3.5 can suggest from the Location Bar

Firefox 3.5 adds a new drop-down menu in the Privacy view when setting your Preferences. Here you can tell Firefox to only search “History” instead of the default of “History and Bookmarks.” This means if you use a bookmark and remove traces of visiting the bookmark, it won’t show up in the Location Bar until you revisit that page you bookmarked.

On a related note of only showing pages you’ve been to, Firefox 3.5 will only suggest pages that you’ve typed in the Location Bar when clicking the drop-down button. This means the 12 sites that appear in the list are those that you frequently use to start browsing. Similarly, Auto Dial 6 has been updated to only show pages you’ve typed. These two make great ways to go back to sites that you launch from.

Two launch-points to get you started in just a couple clicks

Two launch-points to get you started in just a couple clicks

If you want more advanced control of the Location Bar behavior, check out Firefox 3.5 Location Bar Preferences.

68 Comments | Tags: Add-on, AwesomeBar, Mozilla

4 February 2009 - 7:19Firefox 3.5 Location Bar Preferences

For those comfortable with twiddling around with about:config, there are several new preferences to play with since Firefox 3. (If that sounds scary, check out my other post about Firefox 3.5 Location Bar Privacy.)

I’ll explain three new groups of preferences that let you..

  1. Toggle suggestions on and off
  2. Customize what results get shown
  3. Change the matching behavior as you type
Configure Smart Location Bar's behavior from about:config

Configure Smart Location Bar's behavior from about:config

Toggle Suggestions

The first preference is fairly simple; toggle browser.urlbar.autocomplete.enabled to turn the location bar suggestions on and off. This is useful if you always want to type out the URLs you want, or if you can type a whole domain and hit enter faster than typing a single letter and having Firefox suggest the site you want.

If you’re just looking to prevent certain pages from showing up in the suggestions, there are better options available than using this sledgehammer (see below). Also, for those who have set browser.urlbar.maxRichResults to 0, -1 or something else (e.g., userChrome.css) to turn off suggestions, using this preference is better as it prevents your CPU from wasting power while searching for results that Firefox won’t show.

Customize Results

The second preference lets you make the location bar only match URLs of pages you’ve visited, similar to Firefox 2′s behavior. It’s much more powerful than just that as it also lets you restrict results to pages that you’ve 1) visited, 2) bookmarked, 3) tagged or 4) typed in addition to letting you force your search terms to match in 1) the title or 2) the URL.

You can use any combination of these filters to reduce the number of results that show up in the location bar’s suggestions. Another way to look at it is if you specify some filters, e.g., bookmarked + typed, you’re getting rid of anything that isn’t that — throw away all results that aren’t bookmarked as well as get rid of pages that you’ve never typed in the location bar.

The way you set these filters in browser.urlbar.default.behavior is slightly tricky if you’re not familiar with “bitmaps.” They’re not too complicated to deal with, but you will have to do some simple addition in your head. :) The way things work is each filter is given a number value, and to figure out what number to set for the preference, just add up the values of each filter you want.

If you want the location bar to only match URLs of pages you’ve visited like Firefox 2, set browser.urlbar.default.behavior to 17 (1 for visited pages + 16 for URLs).

Similarly, if you want to additionally restrict results to pages you’ve typed in, add in an extra 32 for “typed” — 49 for matching URLs of typed, visited pages. So for those who have used browser.urlbar.matchOnlyTyped in the past, you’ll probably want to add 32 to any other filters you want.

The whole set of values for each filter are as follows:

  • 1: visited
  • 2: bookmarked
  • 4: tagged
  • 8: match title
  • 16: match URL
  • 32: typed

Filter On-Demand

The last group of preferences are very related to the previous preference, and I’ve introduced their functionality in my post on Firefox 3.5 Restricts, Matches, Keywords.

Basically they do the same thing as the previous preference except you type in a special character to turn on a filter as you’re searching from the location bar. This lets you pick and choose when you want the filters to be in effect instead of always being on.

The default symbols for these “on-demand” filters are as follows:

  • ^: browser.urlbar.restrict.history
  • *: browser.urlbar.restrict.bookmark
  • +: browser.urlbar.restrict.tag
  • ~: browser.urlbar.restrict.typed
  • #: browser.urlbar.match.title
  • @: browser.urlbar.match.url

One big difference from what I described in the earlier post is the handling of empty filters. Setting these restrict/match preferences’ special symbols to nothing prevents you from (accidentally) activating that filter dynamically. However, you can still set the default.behavior to use that filter automatically.

56 Comments | Tags: AwesomeBar, Mozilla

24 November 2008 - 11:15ABC Meme

From bsmedberg [benjamin.smedbergs.us].. but a little more automated.

1) In Firefox 3.1, copy the following block of code and paste it into the “Code:” line in the Error Console (cmd-shift-J) then hit enter:

C=Components;d=C.classes['@mozilla.org/browser/nav-history-service;1'].getService(C.interfaces.nsPIPlacesDatabase).DBConnection;for(o=[],c=97;c<123;c++){h=String.fromCharCode(c);q=d.createStatement('SELECT title t, url u FROM moz_inputhistory JOIN moz_places ON id=place_id WHERE input LIKE \''+h+'%\' ORDER BY use_count DESC LIMIT 1');if(q.step())o.push(['<b>',h,'</b>: <a href="',q.row.u,'">',q.row.t,'</a>'].join(''))}open('data:text/html,'+o.join('<br/>\n'))

2) View source to copy the generated html to put in your blog. (I’ve added emphasis for what I was trying to match.)

a: Amazon.com: Online Shopping for Electronics, Apparel, Computers, Books, DVDs & more
b: Bank of America | Home | Personal
c: Capital One Online Banking | Capital One Online Banking
d: Digg – All News, Videos, & Images
e: edilee
f: Firefox Builds • mozillaZine Forums
g: Video Game Cheats, Reviews, FAQs, Message Boards, and More – GameFAQs
h: Hulu – House
i: The Internet Movie Database (IMDb)
j: Joystiq
k: Kotaku, the Gamer’s Guide
l: The LLVMdev November 2008 Archive by thread
m: Mac Rumors: Apple Mac Rumors and News You Care About
n: Gaming Discussion – NeoGAF
o: OrderStatus
p: Planet Mozilla
q: PhD Qualifying Examination | University of Illinois at Urbana-Champaign
r: Google Reader
s: JavaScript Shell 1.4
t: tinderbox: Firefox
u: Gmail – Search results – edilee@gmail.com (unread)
v: Apple – Support – Discussions – New MacBook connected to external VGA
w: Firefox3.1/StatusMeetings – MozillaWiki
x: xkcd – A Webcomic – Drapes
y: Bug 465076 – Yet another Ctrl+Tab / All Tabs design revision
z: Craig Zilles, Department of Computer Sciences

The pages listed here are those that I visit frequently, so it’s not the best way to see the word searching ability of the location bar; however, it’s interesting to see that all but one site matches on the title. It’s also neat to know that I only need to type a single letter and hit enter [addons.mozilla.org] to go to those sites. :)

7 Comments | Tags: Add-on, AwesomeBar, Mozilla

27 August 2008 - 16:32Auto Dial Add-on for Quick Page Access

Aza recently suggested a zero-configuration speed dial interface [azarask.in], so I started hacking on an add-on to do just that. After plenty of user feedback and reviews over the last couple days, you can get Auto Dial 4 [addons.mozilla.org] as a public add-on without needing to log in.

The add-on creates a page that fills up the screen with links to your frequently visited pages with the most frequently visited ones at the top being the easiest to click. As you go further down in the list, the links become smaller for the pages that you less frequently visit.

Auto Dial Add-on
Quick access to frequently visited pages on new tabs (Ctrl/Cmd-T) (larger)

The Auto Dial page shows up every time you open a new tab. So after you hit Ctrl/Cmd-T, you can type into the Smart Location Bar as usual to search through your history as well as easily access your frequently visited pages with a click. With the Auto Dial page, you can click any of the pages like a normal link (middle-click or Ctrl/Cmd-click to open in a tab).

Other features in the current version include letting you to type the page’s number to jump right to it (hover over a link to see its number), moving selection with the keyboard and stripping off “http://” from URLs. There’s also a collection of about:config preferences to tweak to your liking: how many pages from the same site to have, how big the largest button should be, how fast the number of buttons grows, and how long you get to type the page number.

Auto Dial Add-on [addons.mozilla.org]

“.. adds incredible functionality. It’s like Active desktop for the browser.” “i love it! instantly my became my first useful home page” – Michael, zac

Thanks again for the feedback through email, my blog, IRC, and AMO.

69 Comments | Tags: Add-on, AwesomeBar, Mozilla