Enhance your site search with OpenSearch

  Wynn Netherland • February 15, 2010

If your web site provides its own search function, set up OpenSearch to let your users search from the browser search box.

With two simple steps you can let users hit your site’s search page without forcing them to visit first.

First, create an OpenSearch definition.

<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
<ShortName>Wynn Netherland</ShortName>
<Description>Designer &amp; Developer</Description>
<Image height="16" width="16" type="image/x-icon">http://wynnnetherland.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://wynnnetherland.com/?s={searchTerms}"/>

Next, reference your search definition in your page layout.

<link rel="search" type="application/opensearchdescription+xml" href="http://wynnnetherland.com/opensearch.xml" title="Wynn Netherland" />

Here’s a quick video on how FireFox and Chrome handle OpenSearch and how your users will benefit: