ghacks Technology News

Firefox Keyword Searches


Roman was asking me if there was a way to add keyword searches to Firefox in a similar manner that Opera allowed it to do. Keyword searches perform searches by typing a selected keyword and a search term. A default keyword search in Firefox is “wp keyword”, e.g. “wp firefox” to search Wikipedia for the search term Firefox. Those keyword searches are entered in the Firefox address bar.

Five default keyword searches are enabled in Firefox, they are: “google”, “wp”, “dict”, “slang” and “quote”. This means you can search Google, Wikipedia, Dictionary.com, the Urban Dictionary and a Stock Symbol Search. It’s not complicated to add your own keyword searches to Firefox, all you need to do is add a search results page to the Firefox Bookmarks and edit this bookmark afterwards.

You need to replace the search term with %s and add a keyword to the search. Lets take my website search as an example. Type in a search term and press search. The url of the result should appear like this: http://www.ghacks.net/?s=firefox. Bookmark that page and go to Bookmarks > Organize Bookmarks afterwards.

Right-click the newly created bookmark and select Properties from the menu. Now replace firefox with %s so that you get http://www.ghacks.net/?s=%s as the new location of the bookmark.

Now enter a keyword for the search, for example “g” without the “” obviously. You can now search my website by simply entering “g search term” in the Firefox address bar.

This only works with websites and search boxes that have the search term in the url of the results.




Tags: , , ,
Categories: Browsing, firefox


Read Related Posts


6 Responses to “Firefox Keyword Searches”

  1. ismaelj says:

    There’s a better and easier way to do this: just right click on the search box of the site and select “Add a keyword to this search”, a pop up dialog will ask you for a name (”Ghacks”, p.e) and a keyword (”g”, p.e). You’re done!

  2. monkey13 says:

    Why do we have to make it more complicated ?
    Just right click on the search field, choose Add a keyword for this search then follow the instruction.
    Official guide is here:
    http://www.mozilla.org/products/firefox/smart-keywords.html

  3. Spin says:

    Doesn’t seem to work for Lifehacker. What am I doing wrong?

  4. Martin says:

    Spin I tried it with the Lifehacker search and it worked fine. Can you paste the strings you have in the bookmark ?

  5. prefekt says:

    Does this work with all versions of FF?

    I’ve steadfastily abstained from upgrading to anything beyond v1.x, as i’m used to using alt+s as a ’send’ command. That was fine & dandy in v1.x, however any subsequent versions (>= 2.0) have used alt+s to bring up the history menu.

    Or, is there anyway to bypass that?

  6. For prefekt, ability to use keyword shortcuts is in all versions of Firefox. The ability for firefox to create a keyword from a search form was added in Firefox 3, but has been available via an extension long before. For a lot more information on keyword shortcuts see
    http://www.mvps.org/dmcritchie/firefox/kws.htm

    Ctrl+H is the actual shortcut for History, no need to use Alt+S to refer through the menu. (Thunderbird is not part of Firefox.) Suggest you look at a table of keyboard shortcuts for Firefox.
    http://www.mvps.org/dmcritchie/firefox/keyboard.htm

    Firefox 2 is no longer supported (except possibly for critical security updates), would suggest you upgrade to the current version of Firefox.
    http://getfirefox.com and for Thunderbird http://getthunderbird.com
    Though if you are on 1.x better check the machine requirements

    for Martin, keywords are a lot more powerful in Firefox than in Opera. In Firefox they are stored in bookmarks and can be used as Opera uses a keyword (alias), or as Opera uses a search shortcut (stored elsewhere), and they can be combined with both and with JavaScript. All browsers use JavaScript but with Firefox you can include a substitution as well, as far as I know Opera doesn’t have that ability, unless you have the script query you for the lookup. In fact they are a lot more powerful than the Mozilla support article describes. (see reference to kws.htm above)

Leave a Reply   Follow Ghacks   Subscribe To Comment Rss

© 2005-2009 Ghacks.net. All Rights Reserved. Privacy Policy - About Us