Using keyword searches: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
No edit summary
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 Bookmark properties.''
In [[Firefox]] and [[Mozilla Suite]] 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 URL. For example, bookmarking http://google.com/, giving it a keyword of "google", and typing "google" into the Location Bar will take you to Google.


In [[Mozilla Suite]] 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 URL, 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".
What makes keywords very powerful is that if you add a "%s" at some place in your bookmark URL, 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==
==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.  
* Search for a random string, say, "mozilla".
* 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".
* Bookmark the resulting page, then open the bookmark's properties and replace the search term with '''%s'''.
* A keyword of "google" is assigned to the bookmark. To recap:
 
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 bookmark's URL look like "http://google.com/search?q=%s".
 
A keyword of "google" is assigned to the bookmark. To recap:


: '''Name''': Google<br>
: '''Name''': Google<br>
Line 13: Line 16:


Now, typing "google mozilla" in the Location Bar will take you to a Google search about Mozilla.
Now, typing "google mozilla" in the Location Bar will take you to a Google search about Mozilla.
''Note: Mozilla Suite users can use the "Bookmarks -> File Bookmark..." feature and edit bookmark's properties at the moment of its creation.''


==See Also==
==See Also==
* [[List of keyword searches]]
* [[List of keyword searches]]
* [[Multiple parameter keyword searches]]
* [[Multiple parameter keyword searches]]
* [http://www.mozilla.org/docs/end-user/keywords.html How Cool are Custom Keywords?] by Asa Dotzler.

Revision as of 21:36, 13 March 2005

In Firefox and Mozilla Suite 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 URL. For example, bookmarking http://google.com/, 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 URL, 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

  • Search for a random string, say, "mozilla".
  • Bookmark the resulting page, then open the bookmark's properties and replace the search term with %s.

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 bookmark's 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.

Note: Mozilla Suite users can use the "Bookmarks -> File Bookmark..." feature and edit bookmark's properties at the moment of its creation.

See Also