Create a Plugin, with a custom search engine. How to add a Search Engine to the Toolbar

Google CSE

  • If you have a Custom Search Engine or AdSense for Search in your page, it is possible to add the Search Engine to the Toolbar (Firefox 2 and IE 7)

Find a Wine with Google CSE

  • The Plugin is an xml file which follow the syntax of OpenSearch :

<?xml version="1.0" encoding="UTF-8" ?>

<OpenSearchDescription xmlns="">

<ShortName>2 or 3 words</ShortName>

<site>URL target when user send an empty query</site>

<Description>Short description</Description>

<Image width="16" height="16">data:image/x-icon;base64,XXX...XXX</Image>


<Image width="16" height="16">type="image/gif"

<LongName>Long title of Search Engine</LongName>







<Url type="text/html" method="get"


How to create the tags

  • Use Ready2Search to generate the tags. This tool create the base64 encoding for the picture. It's better to have this encoding, to not load the picture every time the plugin is used
  • For the Url tag, you need to use your Search Engine with a keyword. Let's try with an example. I search for cabernet. In the adress bar, I have this URL : XXXX ... XX

  • The adress until (inclusive) &q= is the Prefix of the template. The part after cabernet is the Suffix. Ready2Search generate for you the Url tag like this : XXXX ... XX

  • Download the setting, and upload the xml file into your site
  • An example of Opensearch xml file

Autodiscovery of the Plugin

  • To support autodiscovery add this link tag :

<link rel="search"
title="Title of Search Engine"

  • If autodiscovery is active, the search bar will ask to add the new Search Engine

Create an anchor to add the Plugin

  • To offer the ability to manually add the Plugin, create an anchor, using AddSearchProvider (Firefox 2 and Internet Explorer 7) :

<a href="#" onclick="window.external.AddSearchProvider(

  • And the result :

Add this plugin to your toolbar

More on Google CSE

One Day - One Label - One Wine