site news archive - firefox keyword searches
20th January 2005 - 02:42
Quick searches in firefox are one of the features I think I've found most useful lately. They do however seem to be one of the less well known features of firefox.
If you've been using firefox for any length of time you might have noticed that if you type a word or phrase into the address bar, it performs a Google "I'm feeling lucky" search; or maybe you just though it was magic. What you may not know though is that if you type 'google <word or phrase here>' it performs a normal Google search instead. Typing 'goto <word or phrase here>' performs an "I'm feeling lucky" search too. The other useful search that comes with firefox is a dictionary.com search, 'dict <word>'.
Where I think the power and usefulness comes into this is that you can add your own custom searches with keywords, that you can then access from the address bar. This means you can access resources you'd normally have to go off to another site to use from within the browser interface.
Before I show how you can add your own keyword searches, there's one other change I made to my setup. I changed the default search that's performed in the address bar from an "I'm feeling lucky" to a regular Google search, I use it far more often than the direct search, and if I want to use a direct search, I can just use the goto keyword. There are details of this change on the firefox tips & tricks page.
The search I'll work through adding is a wikipedia search, as I have actually used it from the bar in the past, and wikipedia is a great resource. The first bit you need to do is just locate the input box for the search form, as you can see on the left here.
When you have located the search box on whichever site you want to add a keyword for, it's as simple as right clicking on the box, and selecting 'Add a Keyword for this Search...' from the context menu that pops up.
Clicking on the add keyword for search menu item pops up the add bookmark dialog. You can see here I've called the search Wikipedia, using a keyword of wiki, and saved into the quick search bookmarks folder. You can save the bookmarks anywhere, but I decided it was convenient to keep them all in the one location. Now you just need to click ok, and we're done.
Now all that's left for us to do is test it, head up towards the address bar, type in 'wiki <something to search for>' and hit enter. Here I'm searching for firefox.
As you can see on the left here, it's gone straight to the firefox page.
I've drawn this process out a little for the purposes of illustration, but it really is nice and simple to do, have a play. One search I've found pretty invaluable in the process of developing this site is php.net's function search. I'm forever having to look up function arguments, or just to look to see if there's a function related to what I'm trying to do. While it's not very much hassle to visit the php site and search using the form there, I certainly find it quicker and easier to just type 'php <function name>', and if the function exists be taken direct the the manual page for it. See what you can come up with.