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
<?xml version="1.0" encoding="UTF-8"?>XHTML
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>jCargoo Search</ShortName>
<LongName>Youssef ELALAOUI Blog Search</LongName>
<Description>Search what you want in the jCargoo's Blog articles</Description>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
<AdultContent>false</AdultContent>
<Language>en-us</Language>
<Developer>Youssef ELALAOUI</Developer>
<Contact>youssef.elalaoui@jcargoo.org</Contact>
<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, http://jcargoo.org</Attribution>
<SyndicationRight>open</SyndicationRight>
<Query role="example" searchTerms="Morocco"/>
<Image height="16" width="16" type="image/x-icon">http://www.imageous.net/files/maarhh727hrda6tsnmzb.ico</Image>
<Url type="text/html" template="http://www.jcargoo.org/search?q={searchTerms}"/>
</OpenSearchDescription>
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="http://jcargoo.i8.com/opensearch.xml" title="jCargoo Blog Search" />
That’s it.
- Promote our sponsors;
- Add any kind of comment or critic;
- Ask me directly by email if you prefer.