让您的网站被Chrome视为搜索引擎

时间:2010-03-05 13:44:25

标签: web-applications seo google-chrome search-engine opensearch

如果我开始在Chrome中输入stackov ..我可以看到像'按Tab键进行搜索的内容  stackoverflow.com'的。

SO基本上被认为是搜索引擎 您是否知道如何在我们的WebApp中实现相同类型的feature

我认为它应该与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>

这是将要使用的网址

http://stackoverflow.com/search?q={searchTerms}
将使用您在chrome中输入的字符串填充

searchTerms

1 个答案:

答案 0 :(得分:4)

是的,你在那里正确的方向。你正在寻找OpenSearch。他们有一些how-to guides以及如何在您自己的网站上实现这一点的教程。