OpenSearch, how to get Google Chrome to search your site.

Ever wonder how sites like battle.net support things like this in Google Chrome?

Well I did, so I did a little bit of digging. It turns out Google Chrome supports an open standard called Open Search. This format is relatively simple, and very easy to add to your own site. I just added it to some of our systems in under 5 minutes.


Adding OpenSearch to your site is incredibly simple, you just have to add a simple tag to your index HTML page, and add a simple XML file that it points to. The link tag looks like this:

<link rel="search" type="application/opensearchdescription+xml" href="http://my-site.com/opensearch.xml" title="MySite Search" />


The opensearch.xml file looks something like this:


<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
   <ShortName>My Site</ShortName>
   <Description>Search My Site</Description>
   <Url type="text/html" method="get" template="http://my-site.com/search?{searchTerms}"/>
   <Image height="16" width="16" type="image/vnd.microsoft.icon">
http://my-site.com/favicon.ico
   </Image>
   <moz:SearchForm>http://my-site/search</moz:SearchForm>
   <Url type="application/opensearchdescription+xml" rel="self" template="http://my-site.com/opensearch.xml"/>
</OpenSearchDescription>




And that's all, the first time someone visits your site, the link tag will be registered, and following attempts to type in that URL will provide them with the option to search (chrome), and it will nicely integrate with other search services as well.

Comments

Hello!

The A9 spec is not functioning anymore.
What we will do?

Look: http://a9.com/-/spec/opensearch/1.1/

Thanks a lot for help!
AndrewBassett said…
Good day! This is sort of off topic but I need some advice from an established post. Can it be tough to set up your personal post? I'm not very techincal but I can figure things out pretty quick. I'm contemplating setting up my very own but I'm uncertain where you should start. Are you experiencing any ideas or suggestions? Thanks Air Ambulance
Unknown said…
I can't see any reference to rel="search" or "opensource" or anything of the sort on auctions.yahoo.co.jp, yet Chrome somehow detects the search on that site. So there must be one more way that this works, even if it's Chrome having a giant hard-coded list of sites and where their search URLs are.
Qasim Khan said…
i really love your post, thanks for sharing Attitude Poetry
Herryjony said…
Searching for online class help near me? Take your online classes has the Pay Someone To Do Your Class Online who provide instant help with online classes, courses & exams.
casinononaams said…
All of the experts on our team are pre-screened buy papers online and have at least 1+ years of experience in helping students achieve academic success. See how we select our employees.
MichelAnthony said…
This is the first time that I visit here. I found so many exciting matters in this particular blog, One thing I would like to request you that pls keep posting such type of informative blog.
Site:https://fortunejackets.com/product/venice-locals-only-work-jacket
Anonymous said…
It really works! I found an online site that provides writing assistance; from where I have been taking Business Dissertation Help for quite some time by the guidance of this open search bar. If you can state your requirements with clarity and precision then it’ll present you with the result accordingly.
Thanks for providing that amazing platform, I appreciate the time and effort you took into putting everything together. You're in fortunate if you're reading this since you may engage our organization to finish your project and relieve you of the stress of writing to write my essay! Thank you for making this information available.
Oliver Beth said…
I found this platform, when I was just looking to find out that how to watch simpsons on fox from anywhere, and it's wonderful and quite informative, thanks for sharing.
EvelynAdam said…
I was writing the whole assignment in my college on it, actually I am working with Vpnsports services providers, and we are offering Argentina vs Mexico Live Stream, who worried about to watch it, can access easily.
Mike Rooney said…
I enjoyed reading your post, very nice share, I want to twit this to my followers. Thanks!.
The warriors vest

James David said…
Thanks for this search method this is very nice and helpful and I will share this with my all friends.
from: embroidery name patches
shane said…
Chris Moyer" is likely a person's name, and without specific context, it is challenging to provide detailed information. It could refer to any individual named Chris Moyer, and additional details such as profession, location, or notable achievements would be needed for a more accurate definition. The name itself does not inherently convey specific meaning without additional context.
attorney for contract disputes
Virginia motorcycle accident lawyer
Richard said…

I appreciate your authenticity and passion in every post, keep shining!The attention to detail on our server best minecraft earth servers is outstanding, from the meticulously crafted builds to the immersive gameplay experience.
dineshbackllink said…
Very nice information to read that is useful. ISI Mark Registration License