Using search prediction with custom Search Engine in Chrome

google-chromesearchsearch-engines

I am using a custom Search Engine in Google Chrome. Since I've changed it, URL predictions have completely stopped. How can I enable them again like they were earlier without changing the default search engine.

I noticed URL prediction works with Google, Bing, Yahoo,… just not my Search Engines. I have access to the server hosting the custom Search Engine, so I can make changes if they are required there

Best Answer

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&amp;gs_ri=chrome-ext-ansg&amp;xssi=t&amp;q={searchTerms}"/>
<Url type="text/html" method="GET" template="http://localhost/search?q={searchTerms}"/>
<SearchForm>http://localhost/</SearchForm>
</OpenSearchDescription>

See this for more information on the standard.

Related Question