Have your WebSite recognized as a Search Engine by Chrome
Asked Answered
D

1

9

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">

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/"> 
  <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</Image> 
  <Url type="text/html" method="get" template="http://stackoverflow.com/search?q={searchTerms}"></Url> 
</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

Diaeresis answered 5/3, 2010 at 13:44 Comment(2)
As I read it, it doesn't say "search with stackoverflow", it says search the domain stackoverflow.com (using whatever search engine Chrome uses), as in "site:stackoverflow.com search terms".Claribelclarice
I preferred this answer here about "How to let Google Chrome detect a site search engine?": https://mcmap.net/q/531546/-how-to-let-google-detect-a-site-search-engineFeaze
D
3

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.

Davie answered 5/3, 2010 at 13:53 Comment(1)
FYI: The links are not working anymoreJacquerie

© 2022 - 2024 — McMap. All rights reserved.