Martijn Veken


Just having
some fun with .NET

Create your own search provider for IE 7.0

Like FireFox Internet Explorer 7.0 now also has the possibility to search websites with the handy little search box in the upper right corner. It's very easy to create  your own OpenSearch description document and add it to IE to search other websites (perhaps your own).

The OpenSearch description document is an XML-document with the following structure:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>CodeProject</ShortName>
<Description>Use to search the CodeProject</Description>
<Tags>example web</Tags>
<Contact>admin@example.com</Contact>
<Url type="text/html"
template="http://www.codeproject.com/info/search.asp?cats=2&amp;cats=3&amp;cats=4&amp;cats=5&amp;cats=6&amp;searchkw={searchTerms}&amp;Submit1=Search&amp;author=&amp;sd=15+Nov+1999&amp;ed="/>
</OpenSearchDescription>

The template attribute is the search url of the site (for this example I used The CodeProject) and contains a special {searchTerms} tag. This is the place where your keywords will be inserted. For a complete specification of this document look here.

To add it to your browser just create a html page like this one:

<html>
<body>
<a href="#" onClick="window.external.AddSearchProvider('http://[your url]/codeproject.xml');">Voeg Codeproject aan je browser toe</a><br/>
</body>
</html>

I have created a sample page here with the CodeProject provider and one for BloggingAbout.Net (although the search function of this blog usually returns no results, will probably be solved in the next upgrade ;-).

 

Comments

Knox North said:

If you're spending time on creating OpenSearch documents, you may find it useful to check out www.openSearchList.com which is a repository of OpenSearch searches that can be easily added to IE7.  You can also add your own customized searches.
# June 21, 2006 2:32 PM

Quadruum said:

this is OpenSearch description, thank you very much for it, but your title is:

"Create your own search provider for IE 7.0"

can you please show how to create your own search provider for IE 7.0 ?

A sample web page would be useful.

Thank you!

# February 11, 2008 3:18 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Please add 7 and 7 and type the answer here: