Search this site (and many others) directly from the Firefox address bar
Firefox's bookmark keyword feature is something that sets it apart from many other browsers. The classic Opera browser supported the feature as well (and called it nicknames) while Internet Explorer and Google Chrome never did.
It is interesting to note however that the new browser Vivaldi supports keywords while the new Opera browser does not.
The basic idea behind the feature is to open bookmarks quickly by using keywords that you associate with them. A keyword consists of one or multiple characters which you can type instead of the address to load the website in the browser.
That's however only part of the functionality. Keywords support parameters that you can pass along provided that the site in question supports them. And it is that feature that we are using to create a custom search option to search this site.
While I demonstrate how that is done using my own site, you can use the same method for other sites that offer similar options.
Lets get started
When you search here on this site and look at the url of the results page you will see something like this: https://www.ghacks.net/?s=firefox&submit=
The search term is firefox in this case and all results that match the term are displayed on the results page as a consequence.
You can use that address to search directly. Simply change the search term and you get a new results page.
While that is useful, it is possible to improve things further.
- Tap on the Alt-key to display the Firefox menu. Select Bookmarks > Show all bookmarks from the menu, or use the shortcut Ctrl-Shift-B instead to open it.
- Right-click on Bookmarks Menu, Unsorted Bookmarks or any other bookmark folder and select New Bookmark from the context menu.
- Add any descriptive name you want.
- Add https://www.ghacks.net/?s=%s&submit= as the location
- Add gh as the keyword (or any free key combination you want to use, e.g. ghacks or g).
- Click on add.
To search Ghacks, type gh followed by the search term in Firefox address bar, e.g. gh windows to search for Windows related articles or gh nirsoft freeware to find results for that search.
This lets you use the search engine here on this site without using Google or another search engine.
The same method applies to other sites as well. All you need to do is replace the search term with %s in the bookmark address. This is a placeholder and the term you enter after the keyword is used automatically in its place when you use the keyword search.
This is as easy as right clicking the search box of any website and select “Create Search” in old Opera. Too bad that the world was too dumb for that according to Opera ASA.
You can do the same in Chrome.
How do you create keywords in Chrome?
I think he did not mean keywords but to add searches this way.
And in Vivaldi!
Very useful and convenient, never knew that feature exist. Tried it on my blog and it automatically, adding it to search, along with the results. I added the new bookmark to bookmarks toolbar that no buddy seems to use, that way it’s not in the way.
Thanks for the Tutorial Marin
Fun fact: You can import a bookmark from Firefox that had a keyword set and it will work in Chrome.
So the feature is built-in but not configurable in the browser itself?
I did my homework to see the answer and it turns out it is configurable. Skip to the light blue box in this page for the punchline: http://lifehacker.com/5476033/how-to-set-keyword-bookmarks-in-google-chrome
In fact I just realized all my imported keyword bookmarks show up in the ‘search engines’ list (but without the %s wildcard).
It feels a bit like a hack and it’s far from convenient, but it exists.
Interesting. Thanks for the link!
I would recommend using “Add to Search Bar” for Firefox as you don’t need to add a bookmark just to create a keyword and search engine.
That’s definitely an option. I have just added OpenSearch to Ghacks so that the existence of a search engine is now indicated in Firefox’s search bar.
Firefox users may also want to try the SmartSearch extension, which provides quick searching for selected text via a context menu. SmartSearch uses the user’s keyword bookmarks as the list of search sites.