How do I mark the search box for chrome to detect and install in its "Other Search Engines"?

When I start typing the names of the following sites in chrome:

  • Amazon
  • Newegg
  • IMDB
  • Quora
  • a lot others...

I can click the tab and chrome allows me to search this search engine. What HTML 'do I add to the <form> to help chrome automatically detect the search box on the site I made? Can I manage the selected keyword?

I found this chrome doc talking about this function from a POV user, but not from a webmaster. They call it "Search for a specific site (search tab)." By the way, Google maps were used for this function, but recently it has died for some reason.

+4
source share
1 answer

I finally found an explanation about chrome at http://www.chromium.org/tab-to-search

Basically, you need to link an OpenSearch description document.

<head> <link type="application/opensearchdescription+xml" rel="search" href="url_of_osdd_file"/> </head> 

And this is the osdd file:

 <?xml version="1.0"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Search My Site</ShortName> <Description>Search My Site</Description> <Url type="text/html" method="get" template="http://my_site/{searchTerms}"/> </OpenSearchDescription> 
+4
source

Source: https://habr.com/ru/post/1444303/


All Articles