views:

141

answers:

1

If I start typing stackov.. in Chrome I can see something like 'Press Tab to search stackoverflow.com'.

SO is basically recognized as a Search Engine.
Do you have any idea of how to implement the same sort of feature in our WebApp?

I think it should be related with OpenSearch

<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="http://sstatic.net/so/opensearch.xml"&gt;

thanks

edit:

I think it should be just a matter of specifing an xml defined in this way (http://sstatic.net/so/opensearch.xml)

    <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"

                       xmlns:moz="http://www.mozilla.org/2006/browser/search/"&gt; 
  <ShortName>Stack Overflow</ShortName> 
  <Description>Search stackoverflow.com for answers to your programming questions</Description> 
  <InputEncoding>UTF-8</InputEncoding> 
  <Image width="16" height="16" type="image/x-icon">http://stackoverflow.com/favicon.ico&lt;/Image&gt; 
  <Url type="text/html" method="get" template="http://stackoverflow.com/search?q={searchTerms}"&gt;&lt;/Url&gt; 
</OpenSearchDescription>

and this is the URL that will be used.

http://stackoverflow.com/search?q={searchTerms}

searchTerms will be populated with the string you typed-in in chrome

+2  A: 

Yes, you're on the right track there. It's OpenSearch you're looking for. They have some how-to guides and tutorials on how to implement this on your own website.

tomlog