Reputation: 2543
I'd like to make a page with a get parameter which contains search keywords. When I enter a website firefox recognises appropriate websites which have search capabilities and allow you to add them with a few clicks. (the drop down menu on the address bar) How can my website tell firefox or chrome that it has a search function that everybody can use from browser address bar or omnibar of chrome?
Upvotes: 2
Views: 113
Reputation: 603
You'll need this meta tag
<link rel="search" type="application/opensearchdescription+xml" href="[your url]/opensearch.xml" title="[Your title]" />
You can find more information here http://www.opensearch.org/Home
Your xml file will look like
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>[Name]</ShortName>
<Description>[Desc]</Description>
<Image height="16" width="16" type="image/x-icon">[ico]</Image>
<Image height="64" width="64" type="image/png">[png]</Image>
<Url type="text/html" method="get" template="[url]/?q={searchTerms}"/>
<Url type="application/opensearchdescription+xml" rel="self" template="[url]/opensearch.xml"/>
</OpenSearchDescription>
Upvotes: 4