W3C home > Mailing lists > Public > public-whatwg-archive@w3.org > September 2012

Re: [whatwg] New URL Standard

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 24 Sep 2012 11:34:56 +0200
Message-ID: <CADnb78jNm6s2-kX0ySOX4S21wFoyzLBxsvnJ=Mp=2YAEwfzPAg@mail.gmail.com>
To: Alexandre Morgaut <Alexandre.Morgaut@4d.com>
Cc: whatwg <whatwg@whatwg.org>
On Sat, Sep 22, 2012 at 9:10 AM, Alexandre Morgaut
<Alexandre.Morgaut@4d.com> wrote:
> Would the URLUtil interface replace the "URL decomposition IDL attributes" of the Location interface?
>         -> http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#url-decomposition-idl-attributes
>         -> http://www.whatwg.org/specs/web-apps/current-work/multipage/history.html#the-location-interface

Yes. My plan is to obsolete most URL parts of HTML.

> Could the search property have a key/value mapping?
> ex:
> http://test.com?param1=value1
> -> var value1 = url.search.param1
> "search" as "window.location" could still be usable as a string

I have been thinking about introducing a .query attribute that would
return a special interface for this purpose, but what the right API
should be seems somewhat tricky. Adam and Erik came up with a solution
that introduces eight new methods (see
http://dvcs.w3.org/hg/url/raw-file/tip/Overview.html#url ) but I hope
we can find something more elegant. (Unless we are stuck with their
solution for some reason, but I believe that is not the case.)

> Shouldn't this document have references on some of the URL related RFCs:

The plan is to obsolete the RFCs. But yes, I will add some references
in the Goals section most likely. Similar to what has been done in the
DOM Standard.

> Should this document include a more complete list of schemes with ones that are more and more used in URLs?

Maybe, kinda depends on what turns out to be the ideal scope for the
URL Standard. For now I only wanted to include those schemes relevant
to the parser (and it may turn out there is a few more of those, e.g.
mailto, javascript, data, and file might need some special casing).

> Unfortunately, the URLUtil interface would not be adapted for them:
> - the "protocol", "host", and "hostname" properties make sense and would work;
> - the query part (search property) is used by the "mailto:" and "sms:" URIs;
> - for "tel:" and "fax", we see "parameters" prefixed by ";" as the ones used in some media types, those parameters could be found in the search property

We might not want to adapt it either because of the relative increase
in complexity while not actually addressing many use cases. You want
to modify query/path for http/https and maybe ws/wss a lot, but not so
much for mailto I'd think.

Received on Monday, 24 September 2012 09:36:00 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 16:24:12 UTC