[whatwg] Proposal for IsSearchProviderInstalled / AddSearchProvider

Kornel Lesiński kornel at geekhood.net
Tue Feb 15 13:48:33 PST 2011


On Mon, 14 Feb 2011 21:34:27 -0000, David Levin <levin at chromium.org> wrote:

> IsSearchProviderInstalled(string url) returns
>   * 2 if the origin in the given url is the default search provider
>   * 1 if the origin in the given url is a search provider but not the  
> default.
>   * 0 otherwise
> If the given url doesn’t have the same security origin as the page, this  
> api throws an access denied exception. (This makes the url redundant but  
> it is kept to be consistent with the method exposed by IE 7.)
>
> AddSearchProvider(string openSearchUrl, [optional] bool asDefault)  
> retrieves the open search document from openSearchUrl and decides in a  
> UA specific
> manner whether to prompt the user about the change or addition.

Change of default search provider is a big thing. You don't change that  
often, and there are only few search engines that make sense to be set as  
the default one. Browsers can simply ship with predefined set of engines,  
and that may be easiest and safest option for users.

There are many many sites that dream they were used as a default search  
engine, but their use of this API is only going to annoy or confuse users.

Change of default search engine may have security implications — there are  
less tech-savvy people who rely on search engine for *everything* they do  
on the net and blindly trust the results (see famous "facebook login"  
case). Malicious sites could try to trick people into setting them as  
default in order to inject links into (proxied) search results.


There's already <link rel=search> that allows browsers discreetly  
integrate site's search in the UI, without having sites clutter layout  
with yet another begging button. All the "like-me", "digg-me" & "tweet-me"  
buttons are awful enough ;)

-- 
regards, Kornel Lesiński



More information about the whatwg mailing list