Using OpenSearch.xml
If your website is searchable, then you can let your browser know how to search it, and create a shortcut search box in the top right of the user’s browser using a few lines of HTML and XML
Add the line
<link rel=”search” type=”application/opensearchdescription+xml” href=”/opensearch.xml” title=”.NET Source Code” />
to the head of the page, where opensearch.xml is:
<?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>.NET Source</ShortName>
<Description>.NET Framework source code</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image height=”16″ width=”16″ type=”image/x-icon”>http://reflector.webtropy.com/images/favicon.ico</Image>
<Url type=”text/html” method=”get” template=”http://reflector.webtropy.com/Search.aspx?search={searchTerms}” />
<moz:SearchForm>http://reflector.webtropy.com</moz:SearchForm>
</OpenSearchDescription>
I’ve used this on my .NET Source code browser website.