Today, I learned something new while using StackOverflow in google chrome that it provides special area in browser’s address bar to search on the site even before you visit the site. I think this is very good feature as user can find the things very quickly on your site and get the expected output as soon as possible without having to see unnecessary details.
In image below you can see that I have enabled it for this site, it is visible in browser’s address bar and just below it you can compare it with the StackOverflow’s search in address bar.
You must be thinking that how to enable this for your own site or any other site that you are implementing, that is very easy task. You need to add OpenSearch XML on your site and link the OpenSearch XML document in html head section.
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> Example.com Example.com Search Search through Example.com UTF-8 UTF-8 false en-us open Example.com tag1,tag2
Place the below html code inside <head> element section of the site.
opensearchdescription+xml" title="Example.com" href="http://www.example.com/opensearch.xml">
What is OpenSearch ?
- OpenSearch is a collection of simple formats for the sharing of search results.
- The OpenSearch description document format can be used to describe a search engine so that it can be used by search client applications.
- The OpenSearch response elements can be used to extend existing syndication formats, such as RSS and Atom, with the extra metadata needed to return search results.
- OpenSearch is a collection of technologies that allow publishing of search results in a format suitable for syndication andaggregation. It is a way for websites and search engines to publish search results in a standard and accessible format.
- OpenSearch was developed by Amazon.com subsidiary A9 and the first version, OpenSearch 1.0, was unveiled by Jeff Bezos at the O’Reilly Emerging Technology Conference in March, 2005.
And OpenSearch document consists of:
- OpenSearch Description files: XML files that identify and describe a search engine.
- OpenSearch Query Syntax: describe where to retrieve the search results
- OpenSearch RSS (in OpenSearch 1.0) or OpenSearch Response (in OpenSearch 1.1): format for providing open search results.
- OpenSearch Aggregators: Sites that can display OpenSearch results.
- OpenSearch “Auto-discovery” to signal the presence of a search plugin link to the user and the link embedded in the header of HTML pages
Find more about opensearch
- Official OpenSearch site: http://www.opensearch.org
- More on Wikipedia: http://en.wikipedia.org/wiki/OpenSearch.
Referenced From Stackoverflow