views:

718

answers:

2

Does anyone have a clue what I name this XML document and where to put it now that I have it created?

I would like to provide an OSDD (OpenSearch description document) on my site so that Google Chrome will automatically pick up search capabilities for it. Google tells me that's how it is done, but not where it should be hosted. I also couldn't find any reference to the final location on the OpenSearch site. I've even tried poking around the source of places that do support it to see if it is some sort of META tag to no avail.

EDIT Well, there is one method of doing it explicitly. Now I just need to see if there is a way for it to happen automatically as it does on a number of sites (none of them have any sort of link tag): bugmenot.com, *.craigslist.org, and any others one might find when they right-click their Chrome address bar and choose "Edit search engines...".

+5  A: 

It should be stored in the root directory of you website. You just add a link to it in your webpages like this:

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

The descriptor document can be hosted just about anywhere, as long as its available to the browser on the client machine.

As Micah pointed out, in the web page you want to "advertise" your search capability, simply add a reference to the OSDD in your HTML HEAD:

<html>
  <head>
    ...
    <link rel="search" type="application/opensearchdescription+xml" title="[display name]" href="[path to OSDD]" />
    ...
  </head>
  ...

What this does is have browsers highlight the search area (e.g., in Firefox, blue glow, in MSIE, the button is highlighted orange, in Chrome, I believe the browser just adds the search provider without asking you) to let an end user know that this site has search capability that the browser can integrate with.

You can create your OSDD file here http://customsearchprovider.appspot.com (though it's really quite simple).

Incidentally, BugMeNot.com, Craigslist etc does not automatically add search providers to your browser (it hasn't done it for me after I've visited it several times). I suspect it must have been added manually, or perhaps imported from another browser when you first installed Chrome.

Jack Leow