Saturday 16 January 2010

Searching from Firefox Address Bar (like Chrome)



While I love the concept of being able to search and access websites from only 1 single address bar, Google Chrome isn't exactly the best browser for me. There's only one reason for that though - it doesn't have the same extension support as Firefox. So Xmarks and AdBlockPlus aren't fully functional (for now) on Chrome.

But why fear when you have high speed internet and Firefox. You can almost (say almost... because you can't always search, as I mention below) get the same functionality of being able to search from the address bar (this is the place you usually type in www.google.com!) like in Chrome without having to download add-ons and other random things. Of course, given the fact that Google has no stake in Firefox, it'll still load Google owned websites, or half of the internet, really slowly. But chances are a few nano-seconds won't make all too much of a difference, especially if you are like me and love to waste time on the interwebs. Of course, you can also tweak Firefox to become an internet hog and load web pages faster.

How to enable Firefox address box search

Enabling Firefox searches is really trivial. All you need to do change certain default configurations in Firefox. Here's how to do it so that you can make Google your default search engine:
  1. Open a New Firefox window (so that you can still read these instructions, duh!)
  2. First type in about:config in the Firefox address bar
  3. Yes. You're about to void the warranty on your browser install. Click on "I'll be careful, I promise."
  4. Type in keyword.URL in the "Filter:" box
  5. Double Click on keyword.URL in the Preference Name area
  6. To use Google search (I've provided some other providers below), type in (or copy and paste):
    http://www.google.com/search?q=
  7. Hit OK
  8. Type in a search query in the address bar to check it out!
Now, you can enjoy your new found search-abilities! If at anytime you wish to reset your Firefox address bar, simply follow the same instructions above up till step 4, but instead of double clicking on keyword.URL, simply right click and click Reset.

Changing search providers for Firefox address bar search

In the above instructions, I provided the search string for Google. But naturally, you can do the same for any other search provider. For instance here are a few things you'd copy and paste when Firefox asks you a new value for keywork.URL in step 6 of the instructions above.
  • Yahoo:
    http://ca.search.yahoo.com/search?p=
  • Bing:
    http://www.bing.com/search?q=

  • Wikipedia:
    http://en.wikipedia.org/wiki/Special:Search?search=

  • Google's I'm Feeling Lucky Feature (this will take you directly to the first web page in a conventional Google search):
    http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=

How to get rid of the existing search box

Getting rid of the existing search box (yeah you likely won't need this anymore) is easy. Just right click near your address bar and click Customize. Then drag the existing search box in to the Options window and you're done. This will now make your Firefox look like Google Chrome!

Custom Search Providers

Creating custom search providers is easy. What Firefox does is simply appends the user's string (the stuff the user types into the address box) to the keyword.URL string value. So, all you need to do is make sure that the keyword.URL string value will cause a search query after Firefox adds the user's search strings and forms a complete URL and goes to that website. In essence, it is merely a matter of finding the keyword.URL string. To do this simply create a few different searches on your desired website and observe the changes in the URL caused by the search. So for Beyond Teck's custom (Google based search engine), every search string gets added after the "q=" part of the URL. So naturally, the keywork.URL string for BeyondTeck's search engine will be all the stuff in the URL before the "q=" part, so it will be:

http://www.google.com/cse?cx=partner-pub-7450531327125251%3A1037qo-kfo1&ie=UTF-8&q=

Stuff you cannot search for from the Firefox Address box

Unlike Chrome, Firefox does have some restrictions for its "search strings" or things that you can search for. Here's a little list (to be continued as I find more things you cannot serach for):
  • Cannot search for things that begin with certain special characters, particularly a "/". So you cannot search for "/..com".
  • You cannot search for a term that begins with "about:" because that term (as in about:config or about: or about:cache) just takes you to Firefox's advanced configuratgion/about/cache pages.
  • You cannot search for things like "define:" because it has a colon in there




Got a question, tip or comment? Send them to beyondteck+question@gmail.com and we'll try to answer it in a blog post!

3 comments:

  1. Very Informative Post. Immediately I will install it.

    ReplyDelete
  2. I like this option because Chrome its a resource hog in the first place so this is a welcoming feature.

    ReplyDelete