Tuesday, 25 January 2011

Custom Search in Firefox and Chrome

I was toying with Chrome on my Eee PC, partly for experimentation and partly because of the slightly-more-efficient use of the 10" screen. Alas, the experiment is on hold as my Eee was liberated from my parents' home in Cape Town while I was there over Christmas. I guess I should've remembered to install Prey...

Back on track, I found Chrome's default search inferior to Firefox's, so I went looking for a fix. In the process I've learned a bit more about the custom search tools available in both Chrome and Firefox. Now I'm recording it here, for your perusal (and probably mine after I've forgotten such tricks).

For the record, these tips were tested on Firefox 3.6.13 and Chrome 8. Major revisions are coming and might change some details.

Restoring Firefox-like behaviour in the Chrome address bar

The "problem" I had was that typing a string into Chrome's address bar would produce a Google search. Not really a problem, but I prefer Firefox's use of Google's "I'm Feeling Lucky" button. Basically, if Google's first hit is really spot on, it'll take you straight to that page. For example, if you type "met office cambridge" into Firefox's bar, you'll get the Met Office forecast for Cambridge. In Chrome, that will be the first hit, but you still need that extra click.

The fix is to change the default search behaviour to use the "I'm Feeling Lucky" feature. I found the explanation on this blog but I'll restate it here for you. First, go to your Chrome options and choose "Basics". Choose "Manage" next to default search and add a search with this URL


Make that the default and you're set.

Other custom searches in Chrome

The custom searches are quite straightforward: Chrome just passes the string you enter in the address bar to the URL template you provide. The keywords are really useful, though. If you have (or add) a search for Wikipedia like


and assign it the keyword "wiki", then typing "wiki electric field" in the address bar will use Wikipedia's search to find articles related to "electric field". Note that this is different to using "site:en.wikipedia.org" as a Google search argument. It's as if you're typing "electric field" straight into the Wikipedia search.

Other things you might want could be Youtube or Google Maps.


In fact, it's not hard to add anything. This blog explains. The long and short is to go to your desired custom search, search something, copy the consequent URL and replace the argument you used with "%s". Assign keywords and you'll save yourself some clicks.

Custom searches in Firefox

Little did I know the keyword trick is available in Firefox too. You can see a list of search engines available from the drop down menu next to the search bar. Click "Manage Search Engines..." and you'll be able to add keywords to the searches that are in the list. These work the same way as for Chrome as described above. Arguments entered in the search bar will still use the selected engine.

To add new searches in Firefox, go to the site, click the search bar drop menu and select "Add <site>". You can add a keyword later. You can also hit the "Get more search engines..." link for even more searches, including some that you can't add with the first method. For example, I can't add Google Maps in Firefox without downloading the Add-On.

Now, if I only I could find a way of getting this keyword/search-engine behaviour on Android's Google search widget...

No comments:

Post a Comment