# How to enable press tab to search in Google Chrome and Mozilla Firefox on your website


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.

<figure>

![Open Search on www.harshbaid.in](images/harshbaid-300x53.png "Open Search on www.harshbaid.in")

<figcaption>Open Search on www.harshbaid.in</figcaption>

</figure>

 

<figure>

![Open Search on www.stackoverflow.com](images/stackoverflow-300x49.png "Open Search on www.stackoverflow.com")

<figcaption>Open Search on www.stackoverflow.com</figcaption>

</figure>

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.

# Example Usage

## **opensearch.xml**

```xml
<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
```

```
http://example.com/favicon.ico
```

## **Html link**

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](http://web.archive.org/web/20191021203705/http://www.opensearch.org:80/Specifications/opensearch/1.1) format can be used to describe a search engine so that it can be used by search client applications.
- The [OpenSearch response elements](http://web.archive.org/web/20191021203705/http://www.opensearch.org:80/Specifications/opensearch/1.1) 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:

1. OpenSearch Description files: XML files that identify and describe a search engine.
2. OpenSearch Query Syntax: describe where to retrieve the search results
3. OpenSearch RSS "RSS (file format)") (in OpenSearch 1.0) or OpenSearch Response (in OpenSearch 1.1): format for providing open search results.
4. OpenSearch Aggregators: Sites that can display OpenSearch results.
5. 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](http://www.opensearch.org/)
- More on Wikipedia: [http://en.wikipedia.org/wiki/OpenSearch](http://en.wikipedia.org/wiki/OpenSearch).

### Referenced From Stackoverflow

[Enable pressing tab to search in google chrome on my website](http://stackoverflow.com/questions/7387188/enable-pressing-tab-to-search-in-google-chrome-on-my-website "Stackoverflow question on tab to search on google chrome")

 

## Related articles

- [instant address bar?](http://www.sippey.com/2010/09/instant-address-bar.html)
- Firefox Secure Search: Some Actionable Insights For Digital Marketers


