Rediscovering Firefox Quicksearch

Firefox LogoQuicksearch is one of those power user tools I remember hearing about way back when, but I never jumped on it. At the time, simply having a Google searchbox in the browser! was revolutionary enough. In fact quicksearch was probably the proto-searchbox. I’m sure the original Phoenix developers were thinking, why clutter the UI with a second textbox when you can just customize how the location bar works? Well, of course not everyone is a power user.

What I remembered (before jogging my memory just now) was that you could type some arcane key sequences into the location bar (not unlike the UNIX command line), followed by your search string, and voila, search results. So typing something like gg firefox quicksearch instead of a URL would be the equivalent of going to http://www.google.com/ and searching for firefox quicksearch. Except it’s not “gg” anymore (or perhaps it never was), it’s just “google”.

I was thinking about this recently because it occurred to me that I’ve created a sort of ad hoc quicksearch for a site I use a whole lot: Wikipedia. Since all of the English Wikipedia URLs begin with “en.” I simply Ctrl+T to open a new tab, type en. into my location bar, hit tab to select the first entry in my history that comes up, backspace the article title, and type the article name I’m searching for.

Using Firefox's location bar history for ad hoc Wikipedia quicksearching

Firefox comes with a number of other quicksearch shortcuts preconfigured. “dict” for dictionary lookups, “quote” for stock quotes, and…”wp” for Wikipedia, etc. You can see these all by going to Bookmarks > Quick Search. As it happens, a quicksearch shortcut is nothing more than a specially formatted bookmark URL with a keyword shortcut specified. Just right-click on any of the quicksearch bookmarks and select Properties to see how it’s defined.

Create your own Quicksearch shortcut

If you work with URLs a lot, you’ll know they usually have a predictable pattern. For instance a Google search result page URL for my name looks like:

http://www.google.com/search?q=justin

(Wow, I’m the 6th result!)

You could manually edit the URL and replace the word “justin” with anything you like and get to the Google search result page for that term. This is important to know for quicksearch, because instead of specifying an actual URL, a quicksearch bookmark specifies a variable URL, where %s denotes the intended location of the search keywords:

http://www.google.com/search?q=%s

Then all you need to do is specify a unique keyword for that bookmark, and you’ll have a quicksearch shortcut ready for business. I changed the Google quicksearch keyword to “g” and I updated the Wikipedia Quicksearch URL to http://en.wikipedia.org/wiki/%s so my query attempts go straight to the page I’m interested in, instead of the default behavior of showing the Wikipedia search results.

Now all I have to do is remember that I’ve done this and change my habits.

Examples

Looking back over my past collection of search engines and thinking about the ones I use primarily today, here are some others I might set up:

PHP Function Reference (php)

http://php.net/manual/en/function.%s

Justinsomnia (j)

http://www.google.com/search?q=site%3Ajustinsomnia.org+%s

Google Maps (map)

http://maps.google.com/maps?q=%s

Flickr (f)

http://flickr.com/photos/tags/%s/

And here are two that Stephanie (and any other bilingual folks) might find useful:

Google Translate English to French (ef)

http://translate.google.com/translate_t?langpair=en|fr&text=%s

Google Translate French to English (fe)

http://translate.google.com/translate_t?langpair=fr|en&text=%s

Cool, huh?

relatedposts

1 comment

name
blog (optional)
comment

With Firefox 2.0 you can just right click into the search box and choose “Add a keyword for this search” and it will create the bookmark with the right URL for you.

And the SmartSearch plugin makes those quicksearches available via a context menu for selected words on a page.