[whatwg] registerProtocolHandler - allow site to specify more info and do custom handling

Anne van Kesteren annevk at opera.com
Tue Sep 22 06:10:02 PDT 2009


On Sat, 19 Sep 2009 13:49:15 +0200, Michael A. Puls II  
<shadow2531 at gmail.com> wrote:
> Currently, registerProtcolHandler works like this:
>
> navigator.registerProtocolHandler("protocol",  
> "http://example.org/?uri=%s", "title");
>
> However, this doesn't allow the site to specify some useful and  
> important information about the site like:
>
> 1. What encoding the server expects. For example, uri= might expect the  
> protocol link that was invoked in the browser to be interpreted as  
> koi8-r instead of utf-8. This might be the case even if the page that  
> uses registerProtocolHandler uses Windows-1251 for example.

The IRI specification dictates UTF-8 already.


> 2. The location of an icon like a favicon.ico file or png etc.

Is this not already known? Or is there no same-origin restriction on these  
methods?


> 3. URI to a help page where the site explains how it makes uses of  
> registerProtocolHandler and gives help and support contacts etc.

How does this help the user?


> 4. Whether to use "POST" instead of GET.

That seems dangerous. Following a link should always use GET.


> [...]
>
> Point being, registerProtocolHandler needs to be more robust. And,  
> although this post is long, the requested additions are quite simple to  
> specify.
>
> Maybe these things can be supported in registerProtocolHandler v.02 once  
> sites like the above prove that they are needed.

I don't see why existing sites would not update what they accept to make  
registerProtocolHandler work. And if user agents want to support sites  
that do not support registerProtocolHandler that is their business I think  
and not an necessarily an issue for the feature.


-- 
Anne van Kesteren
http://annevankesteren.nl/



More information about the whatwg mailing list