6

I have been trying to add opensearch support to my website. This is what I have as opensearch.xml file:

   <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <script/>
  <ShortName>Host</ShortName>
  <Description>Search my Website</Description>
  <InputEncoding>UTF-8</InputEncoding>
  <Image width="16" height="16" type="image/x-icon">Favicon url</Image>
  <Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;q={searchTerms}" />
  <Url type="text/html" method="GET" template="http://yoursite.com/?s={searchTerms}" />
  <SearchForm>http://yoursite.com/</SearchForm>
</OpenSearchDescription>

But it's registering the URL name as search engine name in Chrome settings and also on press tab suggestion. What can I change to recognize the search engine with a different name?

David Walschots
  • 12,279
  • 5
  • 36
  • 59
  • 1
    not so sure but I think you have a typo "" – calm Sep 14 '18 at 12:31
  • 1
    not sure we're talking about the same thing... but maybe that can answer you: https://sourceforge.net/p/opensearchserve/discussion/947147/thread/7c4b5501/ – Legion Sep 14 '18 at 15:52

1 Answers1

0

First of all, that script tag shouldn't be there, so you should have something like this:

 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  <ShortName>Host</ShortName>
  <Description>Search my Website</Description>
  <InputEncoding>UTF-8</InputEncoding>
  <Image width="16" height="16" type="image/x-icon">Favicon url</Image>
  <Url type="application/x-suggestions+json" method="GET" template="http://suggestqueries.google.com/complete/search?output=firefox&amp;q={searchTerms}" />
  <Url type="text/html" method="GET" template="http://yoursite.com/?s={searchTerms}" />
  <SearchForm>http://yoursite.com/</SearchForm>
</OpenSearchDescription>

Then, Have you tried changing the name from the link element that is included on the page?

<link rel="search" href="/opensearchdescription.xml" type="application/opensearchdescription+xml" title="name" />
cluelessdev
  • 187
  • 1
  • 5