8

I am trying to get an open search definition to work on subdomains.

I have added the correct line in the <head> of the html.

Example:

<link rel="search" type="application/opensearchdescription+xml" title="Example" href="http://www.example.org/opensearch.xml" />

In opensearch.xml:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Example</ShortName>
<LongName>Example Search</LongName>
<Description>Example Description</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://www.example.org/favicon.ico</Image>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}" />
</OpenSearchDescription>

The search is correctly added to the omnibox settings in Google Chrome, when I visit http://www.example.org. The trigger keyword becomes "example.org".

However, when I visit http://subdomain.example.org, which has the same line in the <head>, the search is added with trigger keyword "subdomain.example.org" instead of "example.org".

Is there a way around this?

I have not found any information on how to set the trigger keyword in the documentation at http://www.opensearch.org/Specifications/OpenSearch/1.1 .

BenMorel
  • 34,448
  • 50
  • 182
  • 322
para
  • 684
  • 5
  • 19
  • 1
    I'd like to know as well. Maybe Chrome's OpenSearch processing has hostname hardcoded as the default keyword. Would be nice if it exposed a way to define this string ourselves. – Alan LaMielle Feb 11 '14 at 19:29
  • It would be awesome if Chrome would just use the ShortName property. I cannot find anywhere in Chrome source code that Chrome looks at a property of the OSD to set the keyword. – Bruce P. Henry Aug 11 '15 at 23:15

0 Answers0