[whatwg] Question about document.referrer (and document.URL, document.location.href) when IDN domains are in use

Anne van Kesteren annevk at annevk.nl
Thu Mar 21 11:40:40 PDT 2013

On Thu, Mar 21, 2013 at 2:33 PM, Boris Zbarsky <bzbarsky at mit.edu> wrote:
> On 3/21/13 7:01 AM, Anne van Kesteren wrote:
>> as the Unicode form is very much a UI decision and
>> we do not want to leak that detail to web developers.
> You mean the decision as to when exactly to use the Unicode and when to use
> ACE?  In what way is it a UI decision (apart from browser URL bars having
> anti-phishing logic that falls back to ACE when they detect "weird" chars in
> the URI)?

E.g. Chrome only shows Unicode if they have indication (prolly locale)
that the end-user will understand it and will use ACE otherwise. I do
not want that kind of logic to leak through developer-exposed APIs.
That's madness.

See http://wiki.whatwg.org/wiki/URL#UI for links to more details.

> Or put another way, it seems like we should be trying to use IRIs until we
> can't for some reason, and I see no a priori reason that location.href can't
> be an IRI...

If we can define "until we can't" I would be okay with that. Otherwise
it seems safer to always use punycode and delegate the problem.


More information about the whatwg mailing list