Using keyword searches: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
m (hao2lian: s/(wil)/$1l/)
No edit summary
Line 1: Line 1:
: ''This also applies to Firefox, except in Firefox, you can right-click on a bookmark to bring up a context menu which will allow you to access Properties.''
: ''This also applies to Firefox except, in Firefox, you can right-click on a bookmark to bring up a context menu which will allow you to access Bookmark Properties.''


In Mozilla you can specify keywords for bookmarks. When you type the keyword in to the location bar and hit enter, the keyword will be replaced with the bookmarked address. What makes keywords very powerful is that if you add a "%s" at some pllace in your bookmark, that will be replaced by the words you type in after your keywords (and before you press Enter).  
In Mozilla you can specify keywords for bookmarks. When you type the keyword into the Location Bar and hit Enter, the keyword will be replaced with the bookmarked address. For example, bookmarking Google, giving it a keyword of "google", and typing "google" into the Location Bar will take you to Google. What makes keywords very powerful is that if you add a "%s" at some place in your bookmark, that will be replaced by the words you type in after your keywords. For example, a keyword of "google" corresponding to "http://google.com/?q=%s" and typing in "google mozilla" into the Location Bar will give you "http://google.com/search?q=mozilla".


This is how you do it: First go to "Bookmarks -> File Bookmark..." This will result in a window popping up where you can specify the name, location (URL), and '''keyword'''. Let's take the Internet Movie Database as an example. The search URL for their database is "http://us.imdb.com/find?tt=on;nm=on;mx=20;q=" where any words typed after the "q=" will be used in the search. This part is where we want to add text so we place a "%s" after the "q=" when writing the location. This makes the location URL look like this: http://us.imdb.com/find?tt=on;nm=on;mx=20;q=%s.  
==Creating Bookmarks with Keywords==
* Go to "Bookmarks -> File Bookmark..." This will result in a window popping up where you can specify the name, location (URL), and the keyword.  
* For example, Google. The search URL for their database is "http://google.com/search?q=" where any words typed after the "q=" will be used in the search. This part is where we want to add text so we place a "%s" after the "q=" when writing the location. This makes the location URL look like "http://google.com/search?q=%s".
* A keyword of "google" is assigned to the bookmark. To recap:


Now you give it a keyword, let's use "movie". So now we have entered the following:
: '''Name''': Google<br>
: '''Location''': http://google.com/search?q=%s<br>
: '''Keyword''': google


'''Name''': <code>Internet Movie Database</code><br>
Now, typing "google mozilla" in the Location Bar will take you to a Google search about Mozilla.
'''Location''': http://us.imdb.com/find?tt=on;nm=on;mx=20;q=%s<br>
'''Keyword''': movie


So the next time you want to check yout the information the Internet Movie Database has on The Nightmare Before Christmas you just type "movie The Nightmare Before Christmas" in to the location bar and just press Enter. Mozilla will then take you to the page the Internet Movie Database's search would give. Just give it a try.
==See Also==
 
* [[Mozilla Suite : Tips : List of keyword searches| List of useful keyword searches]]
We've also assembled [[Mozilla Suite : Tips : List of keyword searches|a list of useful keyword searches]].

Revision as of 21:12, 25 February 2005

This also applies to Firefox except, in Firefox, you can right-click on a bookmark to bring up a context menu which will allow you to access Bookmark Properties.

In Mozilla you can specify keywords for bookmarks. When you type the keyword into the Location Bar and hit Enter, the keyword will be replaced with the bookmarked address. For example, bookmarking Google, giving it a keyword of "google", and typing "google" into the Location Bar will take you to Google. What makes keywords very powerful is that if you add a "%s" at some place in your bookmark, that will be replaced by the words you type in after your keywords. For example, a keyword of "google" corresponding to "http://google.com/?q=%s" and typing in "google mozilla" into the Location Bar will give you "http://google.com/search?q=mozilla".

Creating Bookmarks with Keywords

  • Go to "Bookmarks -> File Bookmark..." This will result in a window popping up where you can specify the name, location (URL), and the keyword.
  • For example, Google. The search URL for their database is "http://google.com/search?q=" where any words typed after the "q=" will be used in the search. This part is where we want to add text so we place a "%s" after the "q=" when writing the location. This makes the location URL look like "http://google.com/search?q=%s".
  • A keyword of "google" is assigned to the bookmark. To recap:
Name: Google
Location: http://google.com/search?q=%s
Keyword: google

Now, typing "google mozilla" in the Location Bar will take you to a Google search about Mozilla.

See Also