Open Searchに対応させてみた

Open Searchに対応させてみた。
Open Searchってなに?という人はwikipedia見てみてください。
導入はいたって簡単!
まずOpenSearch description documentを作成します。
書式
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>【サイトの名前】</ShortName>
<Description>【サイトの説明】</Description>
<InputEncoding>【サイトの文字コード】</InputEncoding>
<Image width="16" height="16">【検索アイコンのURL】</Image>
<Url type="text/html" method="GET" template="【サイトの検索ページのURL】">
<Param name="q" value="{searchTerms}"/>←【必要なパラメーター{searchTerms}はここに検索ワードが入ります。】
</Url>
<moz:SearchForm>【サイトの検索ページのURL】</moz:SearchForm>
</OpenSearchDescription>
xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>【サイトの名前】</ShortName>
<Description>【サイトの説明】</Description>
<InputEncoding>【サイトの文字コード】</InputEncoding>
<Image width="16" height="16">【検索アイコンのURL】</Image>
<Url type="text/html" method="GET" template="【サイトの検索ページのURL】">
<Param name="q" value="{searchTerms}"/>←【必要なパラメーター{searchTerms}はここに検索ワードが入ります。】
</Url>
<moz:SearchForm>【サイトの検索ページのURL】</moz:SearchForm>
</OpenSearchDescription>
ブラウザに認識されるようにHTTPヘッダに記入
<link rel="search" type="application/opensearchdescription+xml" href="【osdファイルのURL】" title="【説明】" />
これで、IEとFFの検索窓に追加できるようになります。
普及するかどうかは疑問だけど、よく使うサイトにあると便利かも・・・
なかったら勝手にも作れちゃうけどね。。。




















このページへのリンクタグ