Firefox 4 default address bar behaviour

6

I have recently migrated to Firefox 4 away from Chrome (Chrome's text highlighting is too annoying as I highlight while I read). One of the things I loved about Chrome was the fact that the address bar would do a google search unless it was a URL. As such, I am in the habit of typing into the address bar "define: menagerie".

Unfortunately, Firefox then gives the error Firefox doesn't know how to open this address, because the protocol (define) isn't associated with any program.

Is there a way to modify Firefox's default address bar behaviour such that it handles this in a more Chrome-esque way? That is, I would like it to perform a search whenever it doesn't recognise the protocol.

Bringer128

Posted 2011-05-05T08:43:25.633

Reputation: 217

Answers

6

A half-solution is to install a protocol handler for define: specifically.

  1. Open Google.

  2. Paste to address bar:

    javascript:window.navigator.registerProtocolHandler("define", "http://www.google.com/search?q=%s", "Google definitions");
    

    (Make sure to change the second parameter to match the google.* domain you are using.)

user1686

Posted 2011-05-05T08:43:25.633

Reputation: 283 655

3Nice! I should also note that just omitting the colon (which triggers Firefox to think that "define" is a protocol) works, too. So "define menagerie" and "define: menagerie" yield the same results. – Tobias Plutat – 2011-06-02T13:40:17.123

8

Why it doesn't work

This just doesn't work with define: xyz or other Google keywords witha colon afterwards, because they are probably interpreted as protocol delimiters (http:, ftp:, ...).

All other searches should work normal. If you type "menagerie" into the URL bar, it does a Google search for it.

By the way: You can also go to about:config and, for example, change the preference keyword.URL to something like http://search.yahoo.com/search?p=, then whenever you enter not an URL, it searches Yahoo for it.

"Workarounds"

But I assume you know that you're going to search for something before you go to the address bar: If you used keyboard shortcuts you'd have pressed Ctrl+L to go to the URL bar, then you might just press Ctrl+K to get to the search bar instead. If you then type in "define: menagerie" it takes you to the definition page as expected.

slhck

Posted 2011-05-05T08:43:25.633

Reputation: 182 472

1Informative answer. Thanks for the keyboard shortcuts, I didn't know about those ones. I've been pressing Shift+F6 to get to the address bar (which highlights the current tab in FF4), so this will be a handy one. – Bringer128 – 2011-05-05T09:03:41.507

1Thanks for the keyboard shortcuts. I was using Alt + D to shift focus to address bar. – Mudassir – 2011-05-05T09:16:05.223

@Bringer128 @Mudassir That's interesting, I'm not a Firefox user but I didn't know that so many alternatives to Ctrl+L existed! – slhck – 2011-05-05T09:18:23.527

The Firefox keyboard controls are listed here : http://support.mozilla.com/en-US/kb/Keyboard%20shortcuts

– BrianA – 2011-05-05T10:56:42.940

1Also neat: if you remove your search bar and press Ctrl+K, it opens the default search engine – notablytipsy – 2013-07-18T06:54:18.010

1

I use quick search bookmarks http://www.sugarrae.com/seo-sphere/creating-firefox-quick-search-bookmarks/

This way I go to address bar give g (keyword I have given for google quick search) then whatever I would want to search for.

and default address bar search engine can be changed http://4paisa.blogspot.com/2008/02/firefox-search-from-address-bar.html

Reddy

Posted 2011-05-05T08:43:25.633

Reputation: 163

1

I, too, have removed the search form from the Firefox 4 interface, as I also did with Firefox 3. However, I use a different method for selecting which search engine to use:

  1. Install the ‘Add to Search Bar’ extension [https://addons.mozilla.org/en-US/firefox/addon/add-to-search-bar/].
  2. Go to any search engine page, or any website that has a search form.
  3. Right click inside the search text box and choose ‘Add to Search Bar…’
  4. The ‘Add Engine to Search Bar’ dialog box will appear. In the ‘Keyword’ entry box, add a meaningful keyword for the search engine/web page – for example, g = Google; gi = Google image; b = Bing, etc. – and click OK.
  5. In future, if you wanted to search Google Image for example, left click in the address bar, type in [gi] [space] [search parameter] – without the square brackets, of course – , and the Google Image page will open showing the results of your search parameter.

I have about 15 of these aliases set up. They make surfing/searching so much easier for me.

user84152

Posted 2011-05-05T08:43:25.633

Reputation: 11