Enhance your site search with OpenSearch

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/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Wynn Netherland</ShortName>
<Description>Designer &amp; Developer</Description>
<Contact>wynn@orrka.com</Contact>
<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}"/>
<moz:SearchForm>http://wynnnetherland.com</moz:SearchForm>
</OpenSearchDescription>

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:

Wynn Netherland

Wynn Netherland is a full stack web creative who lives in Texas. When he isn't trying to change the world at Pure Charity, he geeks out on The Changelog, writes about Sass, and occasionally speaks at conferences and meetups.

You can follow him on Twitter or GitHub.