Image related to this topic...

Searching from the Address Bar in Mozilla

The Mozilla Project is great. Really great. With Mozilla 1.4 you get so much more than you do with many other browsers:

However, some features are still missing, but that doesn't mean that you are left out in the cold. You can always look at the Mozdev which has a lot of themes, plugins and the like for you Mozilla application (Be it Browser, Firebird or Chimera). Sometimes however, the plugin might not have been created yet or it is too unstable for daily use. Or perhaps it would be overkill to use a plugin. Here I present you with one of the enhancements I did to my Mozilla in order to get more out of it.

Turning the address bar in to a search field

It is already possible to search from the address bar in Mozilla by using the search feature in the bottom, but it is limited to one predefined search engine.

In the Preferences dialog under Navigator - Smart Browsing, there is an option to enable "Internet Keywords." Enabling Internet Keywords makes it possible to have the contents typed in to the address bar sent to a server. If you for instance type in aol in the address bar with internet keywords turned on, you will get a page from Netscape showing perhaps search results for AOL or perhaps redirecting you directly. In Mozilla Browser this is disabled by default, which is rather smart since it defaults to the Netscape Search site.

Screenshot showing the preferences pane

Setting Google as keyword handler

The server that handles the requests can be changed relatively easy. In the address bar type in about:config and hit enter. Now navigate to the line keyword.URL, doubleclick and paste one of the below URL's:

http://www.google.com/search?q= for a normal Google search

http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q= for an "I'm feeling lucky" search redirecting you to the first result.

Remember, of course, that "Enable Internet Keywords" must be enabled for this to work.

Screenshot of the relevant part of about:config in Mozilla
Screenshot of the relevant part of about:config in Mozilla

Searching different search engines from the same address bar

Having access to only one search engine can be rather limiting, but with some bookmarking you can add even more search engines to the address line.

With bookmarks there already is an option to set a keyword that provides easy access to a long address. For instance, I have setup the keyword "uf" to redirect me to the daily UserFriendly in zoom 1:1. That's smart. The interesting thing, however, is that arguments can be parsed too. For instance I have another bookmark with the keyword "lucky."

The address for "lucky" is http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=%s

Note the trailing %s. When I type "lucky linux counter" and hit enter, the %s in the address is replaced with the arguments - "linux counter" and I am first redirected to Google, which then redirects me to counter.li.org that is the number one result when searching for linux counter on Google.

Screenshot of the bookmark settings