html - rel ="search"有什么作用?

标签 html meta

这个问题在这里已经有了答案:





How to let Google detect a site search engine?

(2 个回答)


4年前关闭。




head Stack Overflow 中有这个标签:

 <link rel="search" type="application/opensearchdescription+xml" title="Stack Overflow" href="/opensearch.xml">

我想知道它是做什么的,它是否与 SEO 相关?

我可以找到这个报价:

Provides a link to a resource that can be used to search through the current document and its related pages.



这有点神秘。谁在寻找?盲人?谷歌机器人?

这是文件的内容:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Stack Overflow</ShortName>
<Description>
Search Stack Overflow: Q&A for professional and enthusiast programmers
</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">
https://cdn.sstatic.net/Sites/stackoverflow/img/favicon.ico?v=4f32ecc8f43d
</Image>
<Url type="text/html" method="get" template="http://stackoverflow.com/search?q={searchTerms}"/>
</OpenSearchDescription>

这是 wikipedia opensearch 上的页面指出:

OpenSearch is a collection of technologies that allow publishing of search results in a format suitable for syndication and aggregation. It is a way for websites and search engines to publish search results in a standard and accessible format. OpenSearch was developed by Amazon.com subsidiary A9 and the first version, OpenSearch 1.0, was unveiled by Jeff Bezos at the O'Reilly Emerging Technology Conference in March, 2005. Draft versions of OpenSearch 1.1 were released during September and December 2005. The OpenSearch specification is licensed by A9 under the Creative Commons Attribution-ShareAlike 2.5 License.



这对我来说仍然太神秘了。

最佳答案

关于搜索值
rel 属性的搜索值给出了一个资源链接,可用于搜索当前文档及其相关页面。

关于rel属性
rel 属性指定当前文档和链接文档之间的关系。仅在存在 href 属性时使用。

这个链接说明了一切。
http://www.stateofdigital.com/good-rel-attributes-beginners-guide/

关于html - rel ="search"有什么作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44189748/

相关文章:

html - 具有多个名称值的元标记

元标记中的 javascript 不适用于 Firefox 和 Internet Explorer

javascript - 我正在尝试使用 join() 函数从 JavaScript 数组中创建一个大字符串,如果可能的话,是否可以包含 html

html - 页眉与正文不在一条直线上

javascript - 使用 JS/jQuery 闪烁通知/确认

html - 图片未显示在 Whatsapp 链接中

html - 在格式化时遇到一些麻烦

html - 使用 border-top 和 border-left 后 max-width 正确地被丢弃了吗?

javascript - 使用javascript正则表达式,从网页获取元标记数据

wordpress - Woocommerce REST API 扩展订单响应