2006/11/30

2 Steps to Create Search Provider

如果你正在浏览我的网站,而不是通过 RSS 订阅;如果你正在使用 Internet Explorer 7 (IE 7), 而不是基于 IE 7 的外壳浏览器 (TheWorld, Maxthon, NetCaptor, etc.), 你会发现 IE 7 右上角的搜索框发生了微小的变化——它的下拉按钮显示为橙色:

IE 7 found new search provider

New search providerAdd search provider

很明显,变化的颜色激发了用户进一步探索的欲望,而又不至于影响当前的浏览。点开它,如上图所示,IE 7 发现这页面可以提供 Search Provider (以下简称 SP). 这是个很吸引人的特性,能帮助用户快速添加特定的搜索引擎。IE 7 官方网站已经有一些可用的 SP, 但显然不能满足用户的个性需求。

现在,我们用两步创建自己的 SP.

1. 向内添加这样的 <link> 标签:

<link title="NAME-OF-THE-MENU-ITEM" href="YOUR-XML-URL" type = "application/opensearchdescription+xml" rel="search">

这里输入你要显示在菜单上的名字和 XML 配置文件的地址。

2. 创建自己的 XML. XML 格式参考:

<?xml version="1.0" encoding="UTF-8" ?>
<opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<shortname>janlay's blog Search</shortname>
<description>Search janlay's blog.</description>
<tags>janlay's blog Search</tags> <contact>janlay</contact> <img height="16" src="" width="16" type="image/png" />http://janlay.com/favicon.ico</img> <url type="text/html" template="http://search.blogger.com/?as_q={searchTerms}&amp;ie=UTF-8&ui=blg&bl_url=janlay.com"> </opensearchdescription>

这里各元素所表示的意义都很直观,不必赘述。值得注意的是,template URL 如果包含 &, 则应写成 &amp;amp; 用以将 XML 的 & 转义。

创建自己的 SP 就这么简单:)

补充:IE 7 菜单项是 Add Search Providers, 注意到这里的 provider 是复数。由此可推知 IE 7 应该支持多个 SPs, 方法就是多写几个 <link> 标签

5 条评论:

倩倩 说...

我用的不是IE 7.0 :(

Lin Huang 说...

caihuanglin20150520
prada outlet
oakley sunglasses
true religion jeans
chanel handbags
coach outlet online
burberry outlet online
true religion sale
cheap jordans
coach factory outlet
abercrombie
michael kors outlet
air max 90
coach factory outlet
gucci outlet online
ray ban sunglasses
ray ban sunglasses
michael kors outlet online
oakley sunglasses sale
burberry scarf
pandora jewelry
ray bans
fitflops outlet
ralph lauren outlet
christian louboutin outlet
rolex watches
michael kors bag
pandora outlet
caoch outlet
gucci outlet
chanel online shop
chanel bags
hollister clothing
kate spade handbags
coach outlet
ralph lauren
coach outlet store online
oakley sunglasses wholesale
ray ban glasses
polo ralph lauren
tory burch outlet online

One J 说...

michael kors
ralph lauren outlet
louis vuitton handbags
coach outlet online
retro 11
oakley sunglasses wholesale
coach outlet online
cheap oakley sunglasses
kd shoes
coach factory outlet
jordan 5
abercrombie store
true religion jeans
jordan 8 playoffs
coach outlet online
retro jordans
oakley sunglasses wholesale
burberry scarf
red timberland boots
tods outlet
football jerseys
michael kors
cheap oakley sunglasses
louis vuitton
oakley sunglasses
20150603yuanyuan

Junda Xu 说...

20151027 junda
coach factory outlet
nfl jerseys
Gucci Outlet Online Sale
Abercrombie T-Shirts
hollister clothing store
ugg boots
michael kors outlet
Michael Kors Outlet Handbags Factory Price
ugg boots
toms outlet
abercrombie
mont blanc
michael kors outlet
michael kors outlet
Coach Outlet Store Online Shop
canada goose outlet
michael kors outlet
Abercrombie and Fitch Outlet Sale
Louis Vuitton Bags Outlet Store
michael kors bags
Wholesale Authentic Designer Handbags
ugg outlet store
air max 95,nike golf,nike janoski,air max 1,nike canada,nike plus,nike shox,nike factory store
michael kors handbag
Louis Vuitton Handbags For Cheap
cheap ugg boots
Christian Louis Vuitton Red Bottoms
coach outlet store online
true religion outlet
canada goose jackets

mmjiaxin 说...

canada goose outelt
michael kors handbags clearance
pittsburgh steelers
oakley sunglasses
the north face outlet
green bay packers
cheap ray ban sunglasses
parajumpers outlet
tory burch outlet online
tommy hilfiger
oakley sunglasses
michael kors handbags
hermes outlet
cheap uggs
ray ban sunglasses
pandora outlet
oakley sunglasses wholesale
michael kors handbags wholesale
ralph lauren polo
cheap wedding dresses
mm1031