MMMeeja

blog :: web development :: opensearch :: opensearch howto

How To Add OpenSearch To Your Website

Posted on 01 Jan 2009 by - Permanent link Trackback this post Subscribe to this post Comment on this post -   

You may have noticed that the MMMeeja website now uses a Google custom search engine in place of the bespoke one that it used when it was first launched. This was necessary due to growth and my laziness - I always forgot to re-index after adding a new page. I followed these instructions on Putting Blogs First and found it to be very easy.

The next step was to add OpenSearch functionality...

OpenSearch

OpenSearch is the name of the standard that can add search engines to the top right of your browser’s navigation bar, like this:

OpenSearch box in Firefox

If you surf onto a web page that has OpenSearch support, you’ll see the drop-down by your browser’s search field glow blue. You can then choose to add the search engine to your browser so it’s instantly available without you having to surf to the homepage just to look something up.

This is a huge advantage for blogs and e-commerce websites that might not rank high in the Google search results for a particular phrase as they’re just a click away from web surfers that already trust the site enough to add it to their browser.

Adding OpenSearch To Your Website

This is a pretty simple process, as I found out when I decided to do so for David Harry’s excellent SEO search engine.

Basically, it’s just a case of adding an XML file in the top level directory of your web site and then putting a new tag into the <HEAD> tags of all your pages, like this:

<link rel="search" type="application/opensearchdescription+xml" title="MMMeeja search" href="opensearch.xml">

This link tag tells the browser where it can find the XML file that describes your search engine.

OpenSearch XML File

Creating the OpenSearch XML file is quite straightforward if you’re familiar with XML. You can see the MMMeeja file here and use that as a template.

The only tricky part is the Url element in which the URL must have any ampersands encoded as &amp;. Also, don’t forget that the URL must be absolute, not relative.

I’ll be writing a bit more about OpenSearch soon, so don’t forget to subscribe if you’re interested.

0 Trackbacks

Trackbacks are closed for this story.

1 Comments

 MarbleHost.com said at 2009-02-24 11:56

Useful information

Hi,

All this information is will prove very useful for the website builder.

Comments are closed for this story.

 

Sitemap

Copyright © 2006-2009 MMMeeja Ltd. All rights reserved.