How to Add Your Website to Firefox's Search Bar With OpenSearch XML?

Posted by jcargoo | Tuesday, December 30, 2008
| 0Delicious Twitter Reddit Digg Loading...

I always believed that the search right from your browser’s address toolbar is very helpful especially when you have the ability to customize (to add/remove) the list of the present websites in order to be able to have other(s) than the ones existing by default. But how about creating your OWN website search feature in the browser among others (Wikipedia, Amazon…) which will allow users to search directly on your site? I mean like so:

This is possible thanks to the OpenSearch XML. Let’s first create our XML file which is very simple to understand and to customize (its name will be opensearch.xml):

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="">
<ShortName>jCargoo Search</ShortName>
<LongName>Youssef ELALAOUI Blog Search</LongName>
<Description>Search what you want in the jCargoo's Blog articles</Description>
<Developer>Youssef ELALAOUI</Developer>
<Description>Search for IT and programming topics like Browser, Add-ons, jQuery, Firefox, Lucene and so on!</Description>
<Tags>youssef elalaoui php css html jquery apache mysql mootools javascript programming struts struts2 ajax google symfony twitter</Tags>
<Attribution>Search data from Youssef ELALAOUI,</Attribution>
<Query role="example" searchTerms="Morocco"/>
<Image height="16" width="16" type="image/x-icon"></Image>
<Url type="text/html" template="{searchTerms}"/>
Add the following line to the header in order to allow each browser to know that I have an Open Search document available:
<link rel="search" type="application/opensearchdescription+xml" href="" title="jCargoo Blog Search" />
Now you can notice that Firefox for example is showing a link that says “Add jCargoo Blog Search” in the browser’s search engine list. If you click on this link, you will be able to see your site whthin the browser with your favicon.

That’s it.

How to encourage this blog if you like it:
  • Promote our sponsors;
  • Add any kind of comment or critic;
  • Ask me directly by email if you prefer.
Just do something like that, and I will have the huge pleasure to continue posting the best of the creativity I have.

Share this post ?

Digg Reddit Stumble Delicious Technorati Twitter Facebook

0 Previous Comments