[whatwg] New URL Standard

Anne van Kesteren annevk at annevk.nl
Mon Sep 24 02:34:56 PDT 2012


On Sat, Sep 22, 2012 at 9:10 AM, Alexandre Morgaut
<Alexandre.Morgaut at 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.


-- 
http://annevankesteren.nl/



More information about the whatwg mailing list