Plusnet
Saturday 21st November 2009 Login | Register

Searching with Chrome's omnibox

December 30th, 2008 at 16:20 by Tamlyn Rhodes

I’ve been using Google Chrome as my primary browser for several months now and the one feature that has really impressed me is the omnibox. It’s essentially the browser address bar and default search box combined but it’s more powerful than either on its own.

Address autocompletion

Firstly, unlike any other browser I’ve used, the URL autocomplete actually works and autocompletes to the URLs I want and not some obscure deep page I visited weeks ago. For example this is what I get when I open a new tab in Opera and type ‘f’ into the address bar:
 

Madness! The situation in Firefox is only marginally better and IE7 is even worse. Now compare this to Chrome:

Facebook and Flickr are the two sites starting with ‘f’ that I visit most often and ‘film 2009′ is a recent search I made starting with ‘f’. Chrome shows me just what I need and no more.

Searching

Searching Google from the omnibox is a doddle (just type in your search and press enter) but it also permits searching other websites. For instance, say I want to search for a photo on Flickr, I simply type ‘fl’:

…press tab…

…type my search terms…

…press enter and voila!

How does it work?

It’s kinda magic but essentially each time you perform a search on a website, Chrome recognises the format of the URL and then allows you to search that site directly from the omnibox. This works for Amazon, Wikipedia, Plus.net… pretty much any site. And the neat thing is you can customise the keyword used for searching by clicking on the spanner icon and going to Options -> Basics -> Default search -> Manage. I often have to look up functions on the PHP website and all I have to do in Chrome is open a new tab and type “php explode” and I’ll be taken straight to the manual page for the explode() function.

The really clever bit

That’s all well and good for sites that have good site search but it’s useless for sites with poor search. The Mozilla Developer Centre, for example, has rubbish search and yet I need it all the time to look up JavaScript functions. So instead I use the power of Google to search the site and take me straight to the first result.

To do this yourself, first you need to craft the URL to do the appropriate search. Use this URL

http://google.com/search?q=site:[url]+%s&btnI=Lucky

but replace [url] with the URL of the site you want to search (for example community.plus.net/blogs/ for this website). The ‘%s’ is a placeholder to tell Chrome where to insert your search terms and the ‘bntl=Lucky’ tricks Google into thinking you clicked on the “I’m feeling lucky” button rather than the standard search button. Now click on the spanner icon in Chrome and go to Options -> Basics -> Default search -> Manage -> Add and enter a descriptive name, a short keyword and the URL you crafted above. For my Mozilla search I used

Name: MDC JavaScript
Keyword: js
URL: http://google.com/search?q=site:developer.mozilla.org/En/Core_JavaScript_1.5_Reference+%s&btnI=Lucky

Now I can just type ‘js string’ into the omnibox, press enter and I’m taken straight to the manual entry for the JavaScript String object.

I think the omnibox rocks. Now can comeone please write an add-on that replicates it in Firefox?!

Tamlyn

This entry was posted by Tamlyn Rhodes on Tuesday, December 30th, 2008 at 4:20 pm and is tagged with , , , and is posted in the category Industry News, Tech News, Web Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.


5 comments on "Searching with Chrome's omnibox"

Oldjim

I use Firefox with the Oldbar addon and that does exactly what I want

bobpullen

You can use the %s variable in Firefox to create smart searches. I use it to locate problems, tickets, jobs, tasks etc. in Workplace (the system we use at work). It's great, you just type 'problem {problem_ID}' into the address bar and it opens the relevant problem. There's also this - http://www.mozilla.org/products/firefox/smart-keywords.html

Ianwild

I'm hooked on Chrome. Every time I go back to firefox it bugs the hell out of me. Speed is the main reason (especially on my clunky work laptop), but I also find the usability and cleanliness of the UI make it hard to go back. I was a big extensions user in firefox, but I don't really miss them in Chrome.

Nice blog anyway Tam.

Ian

xpcomputers

I'm using SRWare "Iron" as my browser.... a privacy-issue-free version of Chrome (Chrome with the phoning google aspects neutered!).

I'm still officially using Firefox as my default, but at least half the time, I use IRON, and find it so speedy!

Mike

xpcomputers

Missed on giving the link to Iron...

http://www.srware.net/en/software_srware_iron.php

Add a Comment




Photos

photo photo photo photo photo photo

View More

Forums

Users online: 84

  • Total Topics: 80014
  • Total Posts: 658335
  • Total Members: 11766

Visit the Forums

Plusnet

Force9

Metronet

Free-Online

Madasafish

PAYH

Just The Name

Related Sites

Community Apps

Here at Plusnet we're always trying to use clever open source things to make our lives easier. Sometimes we write our own and make other people's lives easier too!

View the Plusnet Open Source applications page

About Plusnet

We sell broadband, phone, VoIP and more to homes and businesses in the UK. Winner of 9 out of 11 Categories in the 2008 USwitch survey. Winner of "Best Consumer ISP" at 2008 ISPA awards. Voted number 1 in the Broadband Choices 2008 survey.

© Plusnet plc All Rights Reserved. E&OE

Community Site News is powered by WordPress

Add to Technorati Favourites