Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Today while playing with Google Chrome Omnibox, I notice a strange behavior. I guess there's some "hidden" web standard behind it, but can't figure it out. Here's how to reproduce:

  1. Go to http://edition.cnn.com/
  2. Use the search function at the higher right corner, Search a random keyword, for example: "abc"
  3. Close the tabs.
  4. Open a new tab, type until Chrome reminds you about http://edition.cnn.com/, then press "Tab"
  5. The Omnibox now shows "Search CNN.com"! And when you type "abc" and press Enter, it uses the CNN search function to do the job, not Google!

I also tried it for several different sites. To some it won't work. But to some sites, like CNN, vnexpress.net, it works after I use the search function of that site once.

I also learnt about chrome://settings/searchEngines (type it in your chrome box and you will see), and learnt about you can add custom search engine in chrome. But the question is, why Chrome can realize the search URL automatically to some pages, and not others?

It's not because some site subscribe to Google service, because I can do the same method for my site (http://ledohoanglong.wordpress.com), and I'm sure that there's no subscription. So I guess there's a method to "expose" the search function of a site, so that Google Chrome can catch it (after I call the search function of that site once, of courses).

Does anyone know about how it works behind the scene?

share|improve this question
    
Just try it. The same method can be applied at programmers.stackexchange.com as well. –  Hoàng Long Mar 23 '12 at 3:22
1  
My rating unfortunately isn't high enough yet to post this as a comment under the original question, nor can I flag this as a duplicate question since it's a separate site (Programmers versus Stack Overflow), but you can find your answer here: stackoverflow.com/questions/7630144/… –  Derek Jun 4 '12 at 13:41
    
@Derek: thanks for pointing out the answer. I want to close this question as well, but as you say, that's a different site. But I think this question is not too "duplicate" with the above question, since I come from a different perspective. I am not even aware why that effect happen.. –  Hoàng Long Jun 5 '12 at 3:27
add comment

1 Answer

up vote 5 down vote accepted

it's the open search standard, OpenSearch 1.1

a collection of technologies that allow publishing of search results in a format suitable for syndication and aggregation. It is a way for websites and search engines to publish search results in a standard and accessible format...

OpenSearch consists of:

  1. OpenSearch Description files: XML files that identify and describe a search engine.
  2. OpenSearch Query Syntax: describe where to retrieve the search results
  3. OpenSearch RSS (in OpenSearch 1.0) or OpenSearch Response (in OpenSearch 1.1): format for providing open search results.
  4. OpenSearch Aggregators: Sites that can display OpenSearch results.
  5. OpenSearch "Auto-discovery" to signal the presence of a search plugin link to the user and the link embedded in the header of HTML pages

OpenSearch Description Documents list search result responses for the given website/tool. Version 1.0 of the specification only allowed one response, in RSS format; however, version 1.1 provides support for multiple responses, which may be in any format. RSS and Atom are the only ones formally supported by OpenSearch aggregators, however other types, such as HTML are perfectly acceptable...

share|improve this answer
    
Thanks for the good answer and sorry for my late reply. I haven't known that there's a thing like it in the first place.. –  Hoàng Long Aug 20 '12 at 4:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.