Finally found the answer (thanks to Labnol). Chrome and other new browsers are using Open Search Standard which can be used to provide more details to Web Browsers by Search Engines.
To add a new Search Engine, add this code onto your webpage.
<a href="javascript:onClick=window.external.AddSearchProvider('search.xml');" target="_self">Add Custom Search</a>
And in search.xml
, add this:
<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/"> <ShortName>SE</ShortName> <Description>Search using SE</Description> <InputEncoding>UTF-8</InputEncoding> <Url type="application/x-suggestions+json" method="GET" template="https://www.google.com/complete/search?client=chrome-omni&gs_ri=chrome-ext-ansg&xssi=t&q="/> <Url type="text/html" method="GET" template="http://localhost/search?q="/> <SearchForm>http://localhost/</SearchForm> </OpenSearchDescription>
See this for more information on the standard.