Blog Customizations, Part 4: OpenSearch Discovery

Blog Customizations, Part 4: OpenSearch Discovery

  • Comments 5

I'm a big fan of extensibility, which is why I was excited to see in a recent blog post on the IE Blog about OpenSearch discovery using <link/> elements. OpenSearch is a collection of XML schemas and extensions to RSS that enables clients like Internet Explorer to interact with search results in order to discover, query, and parse search results in a standard way.

Web sites can add new search providers using window.external.AddSearchProvider in Internet Explorer 7 Beta 2 Preview. I'm not naive enough to think anyone would want a permanent provider listing for my blog, but I have again customized this blog to add two <link/> elements that allow IE7 Beta 2 Preview to use the same search box to search both my and MSDN's blog content. Below is the result of this new customization.

Since I have limited ability to customize my blog I have had to take advantage of the fact that Internet Explorer currently accepts <link/> tags in the body. The elements are simply the following:

<link rel="search" title="Heath Stewart's Blog" href="" type="application/opensearchdescription+xml" />
link rel="search" title="MSDN Blogs" href="" type="application/opensearchdescription+xml" />

OpenSearch Descriptions are quite simple. The content of the first URL above follows:

<?xml version="1.0"?>
OpenSearchDescription xmlns="">
ShortName>Heath Stewart</ShortName>
Description>Search Heath Stewart's Blog</Description>
Url type="text/html" template="{searchTerms}&amp;p={startPage}" />
    <LongName>Heath Stewart's Blog</LongName>

Consider adding OpenSearch to your site. See for more information.

Leave a Comment
  • Please add 5 and 5 and type the answer here:
  • Post
  • one small quibble: ShortName is limited to 16 characters, you should be using LongName. Otherwise, excellent post.
  • Michael, thanks for pointing that out. I'll get the post and the OpenSearch descriptions fixed. For folks at home tuning in, see for what Michael mentioned.

    If only I would've had a "not-so-user-friendly-but-geeky" XML schema. I haven't been able to find one on the OpenSearch site. Has anyone seen one? Documenting XML should be through schemas but certainly more user-friendly descriptions like the specification link I posted are genuinely helpful.

    That's still no excuse for missing that constraint, though. Thanks, Michael.
  • I'm not aware of any XML schema for OpenSearch yet, but if you created one I'm sure they'd add it to the website.
  • The awesome Health Stewart has graciously let me plagiarise his custom CSS to help me make my blog look

  • Sometime back I updated my blog to take advantage of Internet Explorer 7 by providing an OpenSearch discovery

Page 1 of 1 (5 items)