Tag Archives: plugin

Creating OpenSearch plugins for Mozilla Firefox

I frequently use the CocktailDB web site to find and compare cocktail recipes.

Being a lazy programmer who uses Firefox, I got fed up with having to go to the main search page to start a new search, so I finally decided to experiment with making an OpenSearch plugin so I could start a search right from the Search Engine section of my Toolbar.

I found the information on the Mozilla Developer site to be sufficient to get me going. The only real issue I hit was figuring out all the right parameters to send in post to the search url. Happily, LiveHTTPHeaders solved this with one request. I turned on LiveHTTPHeaders from Tools, made a request from the normal search page, and voilĂ , all the parameters were captured for me to examine and add as needed to my OpenSearch xml document.

Within a half-hour, I had two different OpenSearch plugins, one to search by recipe name, and one by an ingredient. I used URI kitchen to get the correct string to format the favicon.ico that CocktailDB uses on their site, created an html page with links in the headers to enable autodiscovery, and I was good to go.

You can try the plugins for yourself by visiting my autodiscovery page and adding one or both plugins. Enjoy, and maybe you’ll be inspired to create a search engine plugin for one of your frequently used sites. Or to mix yourself a nice drink.

Cheers!