<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>indiWiz.com &#187; opensearch</title>
	<atom:link href="http://indiwiz.com/tag/opensearch/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:24:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>OpenSearch search providers and browsers</title>
		<link>http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/</link>
		<comments>http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 05:06:10 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[opensearch]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[webbrowser]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=587</guid>
		<description><![CDATA[All the major browser vendors support the OpenSearch format (yes, this means including Microsoft IE8) for registering a search provider in your browser. Writing a OpenSearch provider Recently I wrote a search provider for my favorite book-buying site, Pustak.co.in: &#60;?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62; &#60;OpenSearchDescription xmlns=&#34;http://a9.com/-/spec/opensearch/1.1/&#34;&#62; &#60;ShortName&#62;Pustak.co.in&#60;/ShortName&#62; &#60;Description&#62;Pustak.co.in provider&#60;/Description&#62; &#60;InputEncoding&#62;UTF-8&#60;/InputEncoding&#62; &#60;Url type=&#34;text/html&#34; template=&#34;http://pustak.co.in/pustak/books/search?q={searchTerms}&#38;amp;type=book&#38;amp;page=1&#34;/&#62; &#60;/OpenSearchDescription&#62; Hosting your search [...]]]></description>
			<content:encoded><![CDATA[<p>All the major browser vendors support the OpenSearch format (yes, this means including Microsoft IE8) for registering a search provider in your browser.</p>
<h4>Writing a OpenSearch provider</h4>
<p>Recently I wrote a search provider for my favorite book-buying site, <a href="http://pustak.co.in/">Pustak.co.in</a>:</p>
<pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;OpenSearchDescription xmlns=&quot;http://a9.com/-/spec/opensearch/1.1/&quot;&gt;
	&lt;ShortName&gt;Pustak.co.in&lt;/ShortName&gt;
	&lt;Description&gt;Pustak.co.in provider&lt;/Description&gt;
	&lt;InputEncoding&gt;UTF-8&lt;/InputEncoding&gt;
	&lt;Url type=&quot;text/html&quot;
		template=&quot;http://pustak.co.in/pustak/books/search?q={searchTerms}&amp;amp;type=book&amp;amp;page=1&quot;/&gt;
&lt;/OpenSearchDescription&gt;
</pre>
<h4>Hosting your search provider</h4>
<p>To let people use your search provider, you need to host it in the web. For our example, let us assume that you host it here: <em>http://yourhost/your_opensearch.xml</em>.</p>
<p>The MIME type of this document can be left to its default <em>application/xml</em>, or can be made OpenSearch specific: <em>application/opensearchdescription+xml</em>.</p>
<h4>Using JavaScript to register a provider</h4>
<p>After deploying the OpenSearch XML in your host, we need to write a JavaScript function to register the provider with your browser:</p>
<pre class="brush: jscript;">
&lt;script type=&quot;text/javascript&quot;&gt;
function registerYourSearchProvider(){
  window.external.AddSearchProvider(&quot;http://yourhost/your_opensearch.xml&quot;);
}
&lt;/script&gt;
</pre>
<p>This JavaScript worked with Firefox, IE8 and Google Chrome. Opera 10 was not able to understand it.</p>
<h4>Auto-discovering OpenSearch providers</h4>
<p>Recently when I saw my Google Chrome search providers, I saw this list:</p>
<p><a href="http://www.flickr.com/photos/subwiz/4132146183/" title="Chrome Search Providers by subWiz, on Flickr"><img src="http://farm3.static.flickr.com/2784/4132146183_4b96fbc9b2_o.png" width="485" height="394" alt="Chrome Search Providers" /></a></p>
<p>I was surprised to see this list because there are providers that I have not added specifically. How was Google Chrome &#8220;discovering&#8221; these providers?</p>
<p>A look into the HTML source of one of the auto-registering search provider, I found the following info (in the &lt;head&gt; section):</p>
<pre class="brush: xml;">
&lt;link rel=&quot;search&quot;
       href=&quot;/mavensearch.xml&quot;
       type=&quot;application/opensearchdescription+xml&quot;
       title=&quot;mavensearch.net&quot; /&gt;
</pre>
<p>To let browsers auto-discover you as a search-provider, add the above in your sites!</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;title=OpenSearch+search+providers+and+browsers" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;title=OpenSearch+search+providers+and+browsers" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;title=OpenSearch+search+providers+and+browsers&amp;desc=All%20the%20major%20browser%20vendors%20support%20the%20OpenSearch%20format%20%28yes%2C%20this%20means%20including%20Microsoft%20IE8%29%20for%20registering%20a%20search%20provider%20in%20your%20browser.%0D%0A%0D%0AWriting%20a%20OpenSearch%20provider%0D%0A%0D%0ARecently%20I%20wrote%20a%20search%20provider%20for%20my%20favorite%20book-buying%20site%2C%20Pustak.co.in%3A%0D%0A%0D%0A%5Bsourcecode%20language%3D%22xml" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;t=OpenSearch+search+providers+and+browsers" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;title=OpenSearch+search+providers+and+browsers&amp;summary=All%20the%20major%20browser%20vendors%20support%20the%20OpenSearch%20format%20%28yes%2C%20this%20means%20including%20Microsoft%20IE8%29%20for%20registering%20a%20search%20provider%20in%20your%20browser.%0D%0A%0D%0AWriting%20a%20OpenSearch%20provider%0D%0A%0D%0ARecently%20I%20wrote%20a%20search%20provider%20for%20my%20favorite%20book-buying%20site%2C%20Pustak.co.in%3A%0D%0A%0D%0A%5Bsourcecode%20language%3D%22xml&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/&amp;title=OpenSearch+search+providers+and+browsers" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/11/25/opensearch-search-providers-and-browsers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
