OpenSearch无法在Firefox中运行:"Firefox无法从"下载搜索插件"

Joh*_*ohn 5 opensearch

在测试以确保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}&#38;source=opensearch" type="application/xhtml+xml" />
</OpenSearchDescription>
Run Code Online (Sandbox Code Playgroud)

生成此错误的错误是什么?

小智 5

没有 text/html Url 元素:

https://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox

请注意,您必须包含 text/html URL — 仅包含 Atom 或 RSS URL 类型(有效,但 Firefox 不支持)的搜索插件也会生成“无法下载搜索插件”错误。

我自己也遇到了同样的问题!

  • 这是相关错误报告的链接:https://bugzilla.mozilla.org/show_bug.cgi?id=871394 (2认同)