Search SimoneCarletti.com from Google Chrome address bar

January 19th, 2010 at 12:55 am • permalink0 comments

I’ve just published a small update to this site to enable OpenSearch protocol. Thanks to OpenSearch, you can search this blog from any OpenSearch-aware client, including for instance Mozilla Firefox and Google Chrome.

I really like the way how Google Chrome deals with OpenSearch. When you browse and OpenSearch-aware site, Google Chrome fetches the OSDD file and make it immediately available as a shortcut in the address bar. For example, if you open a couple of pages in this site then you type simone you should see the following behavior.

Google Chrome suggests an available OpenSearch provider

Google Chrome suggests an available OpenSearch provider

If you hit tab, the autocomplete list disappears and you enter the “OpenSearch mode”. You can now enter the search query and confirm to view the search results.

Google Chrome integrates OpenSearch provider in the address bar

Google Chrome integrates OpenSearch provider in the address bar

Creating an OpenSearch OSDD is as simple as writing less than 10 lines of XML code. Here’s mine. For more information visit the OpenSearch website.

PS. If you are a Ruby developer, here’s my Builder template. Replace TITLE, DESCRIPTION and PATH_TO_SEARCH with your own variables.

xml.instruct!
xml.OpenSearchDescription "xmlns" => "http://a9.com/-/spec/opensearch/1.1/",
                          "xmlns:moz" => "http://www.mozilla.org/2006/browser/search/" do
  xml.ShortName "TITLE"
  xml.Description "DESCRIPTION"
  xml.InputEncoding "UTF-8"
  xml.Url :type => "text/html", :method => "get", :template => "PATH_TO_SEARCH?q={searchTerms}"

  xml.moz :SearchForm, "PATH_TO_SEARCH"

end
  1. How to run Google Chrome OS on Mac OS X with VMWare Fusion
  2. Google Chrome OS User Agent
  3. Google Site performance tool says Google is not serving Gzipped resources
  4. Are you ready to join the Search Marketing Arena?
  5. Welcome RoboDomain

Filed in Programming, Softwares • Tags: , , , ,


Add a Comment




Follow Me
    Random Quote