Mobile app version of vmapp.org
Login or Join
Hamm4606531

: Making a site searchable via Chrome search bar I use Google Chrome. When I want to search Wikipedia, I type www.wikipedia.org into the search bar and then press tab. The screen looks like this:

@Hamm4606531

Posted in: #GoogleChrome #Search

I use Google Chrome. When I want to search Wikipedia, I type wikipedia.org into the search bar and then press tab. The screen looks like this:



If I type some search words, it uses the actual search functionality of Wikipedia, instead of just returning a Google search of site:www.wikipedia.org x y z.

I have a site with search functionality using a regular html form, but I can't do the tab trick to search the site. Is there any way I can change my site's search page to be recognized by Chrome (and possibly other applications, if there's a standard format)? Google searching this only gives me results about registering my site with the Google search engine, frustratingly.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamm4606531

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shelley277

Ironically the answer is on this page and every other Stack Exchange site :)

You have to define an OpenSearchDescription for your site. If you look at the source code of this page you will see in the header:

<link rel="search" type="application/opensearchdescription+xml" title="Pro Webmasters - Stack Exchange" href="/opensearch.xml">


And if you open opensearch.xml referenced here you see:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Webmasters</ShortName>
<Description>Search Webmasters: Q&A for pro webmasters</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/x-icon">http://sstatic.net/webmasters/img/favicon.ico</Image>
<Url type="text/html" method="get" template="http://webmasters.stackexchange.com/search?q={searchTerms}"/>
</OpenSearchDescription>


You have to implement the same for your site. The key is that you do need some kind of search implemented on you site which is used by the broswer to perform the actual search. This is specified in the template part of the XML:
webmasters.stackexchange.com/search?q={searchTerms}

Google Custom Search can be used for this purpose if you have no current search on your site.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme