Outfox, Outsearch with Firefox

Searching from address bar

Did you know that if you entered a search term into the address bar (where you’d normally enter a URL), Firefox does a “I’m Feeling Lucky” search on Google? If you don’t know what that means, try clicking the “I’m Feeling Lucky” search on Google the next time you’re there – basically, it takes you to the very first search result.

Granted, not many people would consider that very useful. I’d prefer to have it perform a normal Google search instead, as I’m sure quite a number of you would too. Not to fear, because with Firefox, you have control!

Let’s see how you can make Firefox perform a standard Google search from the address bar:

  1. Type in about:config in your Firefox address bar. It should open a page like this (click for a larger image):
    Screenshot of Firefox about:config page

  2. In the “Filter” textbox, enter “keyword.URL“. You should then see the keyword.URL preference with the value “http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=”. This is what makes it perform a “I’m Feeling Lucky” search.
  3. All we got to do, is to double-click that preference, and enter “http://www.google.com/search?btnG=Google+Search&q=” in the textbox of the dialog that comes up.
    Screenshot of keyword.URL preference dialog
  4. Hit “OK”, and you’re done! Try it out.

If Google doesn’t quite float your boat, you can use other search engines as well. Use “http://search.yahoo.com/search?p=” for a Yahoo! search, “http://imdb.com/find?q=” for a IMDB search, “http://dictionary.reference.com/search?q=” for a Dictionary.com search, and so on. You just have to make sure that the search string of your search facility accepts a query string that takes in your keyword(s).

Custom keywords

This is an amazingly powerful feature in Firefox. With custom keywords, you can load up a webpage using with your assigned keyword. For example, I can go to the SitePoint.com website by typing “sp” into the address bar. To achieve that, all I had to do was to create a bookmark for SitePoint.com (http://sitepoint.com/) and add the keyword “sp”.

“That’s it?”, you say. Well, we’re getting to it, the real power of custom keywords, that is. With custom keywords, I can Google search for the “best browser” by typing “g best browser” in the address bar, lookup the meaning of “promissory” on Dictionary.com by typing “d promissory”, and lookup the Bugzilla bug report for bug 75138 by typing “bug 75138”. Let’s work through how to do that with a Dictionary.com custom keyword search.

  1. Bookmark “http://dictionary.reference.com/search?q=%s”. “%s” is the placeholder that will be replaced by the word (or words) whose meaning you’re looking up.
  2. Give the bookmark a keyword as described above. I use “d”.
  3. Your bookmark properties should then look like this:
    Screenshot of bookmark properties and custom keyword field

  4. Click “OK” and now typing “d estoppel” in the address bar will load the Dictionary.com entry for “estoppel”.

Asa Dotzler has a good write-up on how to use custom keywords.

Ben Goodger has also created a Firefox extension called SmartSearch that adds a Smart Keyword menu in the context menu.

Context menu search

Another convenient feature that boosts your search productivity – searching from the right-click context menu. Select the words you want to search, right-click, then select Search Web for “keyword”. This will perform a search for your keyword on Google.

Screenshot of Firefox context menu search

Don’t like Google? Go to about:config in your Firefox address bar as described in the “Searching from address bar” section and look for the browser.search.defaulturl preference (its value should be “http://www.google.com/search?lr=&ie=UTF-8&oe=UTF-8&q=”). You know what to do! (Hint: read the “Searching from address bar” section.)

Find as you type

Now that you’ve got some search results, you may want to search for occurences of your keyword in a long page. The “Find as you type” function is your savior. Just start typing the word (or words) that you want to find. Firefox will incrementally find and highlight the first instance of the word that matches what you type.

Screenshot of Find as you Type feature in action

Use F3 or Ctrl-G to do a “Find next”. No need to use the mouse, no need for an extra “Find” dialog that gets in the way! This is one of my favorite Firefox features (this is also in Opera) and I often lapse into simply typing to search for stuff in the occasions when I have to use IE!

Change the width of the search bar

The default search bar width is rather small, probably big enough for 20 characters. You can fix this if it bothers you by changing the width by editing your userChrome.css. The userChrome.css file is located in the “chrome” directory in your profile directory. The Firefox Help site has a page explaining how to get to your userChrome.css, if you’re not familiar with where your profile folder is. Once you have your userChrome.css, put this bit in there to increase its relative weight so taht it appears longer:

#search-container {
-moz-box-flex: 350 !important;

Search Improvements in Firefox 0.9

Firefox 0.9 come withs more features that will improve your search productivity. You’ll be able to drag a bit of selected text into the search bar and perform a search on that text. Firefox 0.9 also includes an auto-complete delete feature where your autocomplete entries can be removed by doing a Shift-delete. Very useful for deleting something you don’t want someone else to come across, without having to clear out your entire history ;)

Another recently added feature is the ability to add smart keywords from form fields. No more messing around with “%s” thingies and what not!

These features have been available in nightly builds for quite some time now, so grab yourself a copy if you want them now. The Burning Edge maintains a watchlist of major bugfixes and regressions, and also links to custom builds (which are professionally packaged and come with processor-specific optimizations).

About the Author

Chu Yeow is a “moderate”
Mozilla evangelist who writes stuff he finds interesting on Mozilla Firefox
and Mozilla
at redemption in
a blog
. Currently employed as a web developer, he’s finding that
the Web Standards utopia may just be a little too far off for our
generation to achieve, beyond the blogosphere at least. He also needs
to stop eating potato chips.


  1. says

    Thanks about the “Shift-delete” thing cleaning out saved form stuff. I was doing it the stupid way till I read your article LOL Oh, and thanks for showing me how to get rid of the “I’m feeling lucky” garbage.

    So, do you not like the MyCrofts? I mostly use my keyworded searches, but I do use some MyCrofts for things I only look up occasionally.

    PS to Wormus…Wow what a cool Wiki!

  2. eyhab says

    When you enter a word in Firefox address bar, it does one of two things, a) looks to see if the word is actually a site by adding www.(word).com to it then taking you there if it is true or b) googles the word. I would like to know how I could make Firefox stop doing a) and only do b). Is that possible.?


  1. My Firefox search article gets Slashdotted (by proxy)

    Forever Geek was looking for articles not a while back, and I thought, “what the heck” why don’t I just ask Paul Scrivens (Paul is the main Forever Geek guy) if he’d like to publish my old original Outsearch with…

  2. Awesome Firefox Tips

    Oh yes! This is exactly what I’ve been looking for. Ever since I’ve started using Firefox instead of Mozilla, I’ve really missed the “type type type down-arrow enter” location bar method of searching Google … instead, Firefox has a separate “search f…

Leave a Reply

Your email address will not be published. Required fields are marked *