在测试以确保 OpenSearch 适用于我的网站时,在单击搜索提供程序将其添加到 Firefox 后,我收到错误消息“Firefox 无法从以下位置下载搜索插件:”。
这是我的 OpenSearch 的来源,看起来像......
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<Description>Search www.example.com</Description>
<Image height="16" width="16" type="image/vnd.microsoft.icon">http://www.example.com/favicon.ico</Image>
<InputEncoding>UTF-8</InputEncoding>
<Url method="get" template="http://www.example.com/search/?q={searchTerms}&source=opensearch" type="application/xhtml+xml" />
</OpenSearchDescription>
我做错了什么导致这个错误?
最佳答案
没有 text/html Url 元素:
https://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox
Note that you must include a text/html URL — search plugins including only Atom or RSS URL types (which is valid, but Firefox doesn't support) will also generate the "could not download the search plugin" error.
我自己也遇到了同样的问题!
关于OpenSearch 在 Firefox 中不起作用 : "Firefox could not download the search plugin from",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16502011/