Chrome で「stackov..」と入力し始めると、「Press Tab to search stackoverflow.com」のようなメッセージが表示されます。
SOは基本的に検索エンジンとして認識されています。同じ種類の機能を WebApp
に実装する方法について何か考えはありますか?
私はそれがOpenSearchに関連しているべきだと思います
<link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="http://sstatic.net/so/opensearch.xml">
ありがとう
編集:
このように定義されたxmlを指定するだけでよいと思います(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>
これが使用されるURLです。
http://stackoverflow.com/search?q={searchTerms}
searchTermsには、chrome に入力した文字列が入力されます