Re: [whatwg] URL resolution of fragment urls in html5 webapps

On Tue, Sep 10, 2013 at 8:34 PM, Ian Hickson <ian@hixie.ch> wrote:
> On Wed, 10 Jul 2013, Rafael Weinstein wrote:
>> I'm curious: Is it useful to have fragment URL resolve against anything
>> other than the "display" url? I.e. when is the current behavior wrt
>> fragments appropriate.
>
> It's a good question. I thought the old IETF specs for URLs said you had
> to do otherwise, but nobody seems to have implemented that.

Browsers have been inconsistent on this actually, not sure if they
still are. I think if we want to do this differently, then after
trimming whitespace to obtain the URL, the <a> element should have a
special case for # and pick a different base URL at that point.

https://tools.ietf.org/html/rfc2396#section-4.2 has the vague wording
that does not take the base URL into account. In
https://tools.ietf.org/html/rfc3986#section-4.4 it does. The problem
with the former is that it's not clear when it applies, but we could
make that clear by only doing it in certain contexts, as I suggested
above.


-- 
http://annevankesteren.nl/

Received on Wednesday, 11 September 2013 10:54:02 UTC