W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2013

Re: Allow javascript: URIs for registerProtocolHandler

From: <piranna@gmail.com>
Date: Tue, 17 Sep 2013 22:34:24 +0200
Message-ID: <CAKfGGh0=HHPFU_NQgE16up8ArdZRxQz3arq_UZO4=0+CATT59g@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: public-webapps@w3.org
> > When using registerProtocolHandler method to register a custom
> > protocol, according to the spec it is required that the uri parameter
> > allow to do a GET operation or their equivalent (so maybe it would be
> > used with ftp instead of http URIs, for example). I have done some
> > tests setting this custom protocol on an <img> tag and it seems to
> > works (at least on Chrome v28).
>
> Really? I thought registerProtocolHandler() was only a hook for
> navigation.

Really :-) I though the same, but since its a "GET equivalent operation"
just like XHR and in fact Google Charts creates on-demand graphics based on
the data on the URL query, so why not? So I created a custom fake protocol,
set it inside the <img> tag and after registering and removing the fake
protocol several times, I saw it only showed the image using the fake
protocol when it was registered :-)

Problem is, as I told before, that this needs a web server to precess the
request and the browser to be online... :-( I read about AppCache can fix
it, but not only it has its own bugs regarding to cache the full paths
(also the query fragment, so it doesn't work correctly offline) but also it
can only return actual static resources, not dinamically generated ones...
:-/
Received on Tuesday, 17 September 2013 20:34:53 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:13 UTC