Archive for the ‘webbrowser’ tag
OpenSearch search providers and browsers
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:
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Pustak.co.in</ShortName>
<Description>Pustak.co.in provider</Description>
<InputEncoding>UTF-8</InputEncoding>
<Url type="text/html"
template="http://pustak.co.in/pustak/books/search?q={searchTerms}&type=book&page=1"/>
</OpenSearchDescription>
Hosting your search provider
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: http://yourhost/your_opensearch.xml.
The MIME type of this document can be left to its default application/xml, or can be made OpenSearch specific: application/opensearchdescription+xml.
Using JavaScript to register a provider
After deploying the OpenSearch XML in your host, we need to write a JavaScript function to register the provider with your browser:
<script type="text/javascript">
function registerYourSearchProvider(){
window.external.AddSearchProvider("http://yourhost/your_opensearch.xml");
}
</script>
This JavaScript worked with Firefox, IE8 and Google Chrome. Opera 10 was not able to understand it.
Auto-discovering OpenSearch providers
Recently when I saw my Google Chrome search providers, I saw this list:
I was surprised to see this list because there are providers that I have not added specifically. How was Google Chrome “discovering” these providers?
A look into the HTML source of one of the auto-registering search provider, I found the following info (in the <head> section):
<link rel="search"
href="/mavensearch.xml"
type="application/opensearchdescription+xml"
title="mavensearch.net" />
To let browsers auto-discover you as a search-provider, add the above in your sites!
Best WebDeveloper plugins for Firefox
I found this interesting link listing the most interesting Firefox plugins.
Google Chrome in Linux
Get it from the Early Access Release Channel.

