mozilla

Compare Revisions

Supporting search suggestions in search plugins

Change Revisions

Revision 182699:

Revision 182699 by Sheppy on

Revision 182700:

Revision 182700 by Sheppy on

Title:
Supporting search suggestions in search plugins
Supporting search suggestions in search plugins
Slug:
Supporting_search_suggestions_in_search_plugins
Supporting_search_suggestions_in_search_plugins
Tags:
Add-ons, OpenSearch, Search, "Search plugins"
Add-ons, OpenSearch, Search, "Search plugins"
Content:

Revision 182699
Revision 182700
n20      The search plugin specifies the <code>&lt;SuggestionUrl&gt;n20      The search plugin specifies the URL to query for a list of 
></code> to query for a list of search suggestions. The search ter>search suggestions by specifying an <code>&lt;Url&gt;</code> elem
>m is appended to this URL, then queried using an HTTP <code>GET</>ent with a <code>template</code> property indicating the URL to q
>code> request.>uery.
n23      For example, the Yahoo search plugin has this <code>&lt;Sugn23      For example, the Yahoo search plugin has this <code>&lt;Url
>gestionUrl&gt;</code>:>&gt;</code> entry:
n26&lt;SuggestionUrl&gt;http://ff.search.yahoo.com/gossip?output=fxjn26&lt;Url type="application/x-suggestions+json" template="http://ff
>son&amp;command=&lt;/SuggestionUrl&gt;>.search.yahoo.com/gossip?output=fxjson&amp;command={searchTerms}"
 >/&gt;
n29      If the user types "fir" into the search bar, then pauses, Fn29      If the user types "fir" into the search bar, then pauses, F
>irefox appends "fir" to the <code>&lt;SuggestionUrl&gt;</code>, t>irefox inserts "fir" in place of <code>{searchTerms}</code> and q
>hen queries that URL:>ueries that URL:
t32&lt;SuggestionUrl&gt;http://ff.search.yahoo.com/gossip?output=fxjt32&lt;Url type="application/x-suggestions+json" template="http://ff
>son&amp;command=fir&lt;/SuggestionUrl&gt;>.search.yahoo.com/gossip?output=fxjson&amp;command=fir"/&gt;

Back to History