[whatwg] proposal for a location.domain property

Anne van Kesteren annevk at annevk.nl
Thu Nov 29 04:31:04 PST 2012


On Sat, May 26, 2012 at 3:58 AM, Maciej Stachowiak <mjs at apple.com> wrote:
> I don't think location.domain would be the same as location.tld, to the extent I understand the intent of them.
> For the URL "http://www.apple.com/", "apple.com" would be the domain, and "com" would be the TLD.

Yes, but for the URL "http://www.google.co.uk/" you would need to have
publicsuffix.org information in order to determine that the effective
domain is "google.co.uk" and not "co.uk".

I'm not going to add this because cookies and document.domain are not
good use cases for this. Cookies should eventually move to an
origin-based security model (probably via some kind of opt-in) and
document.domain should simply be avoided.

(Ian asked me to reply to this thread
https://www.w3.org/Bugs/Public/show_bug.cgi?id=20011 as the URL
Standard now deals with these attributes.)


-- 
http://annevankesteren.nl/


More information about the whatwg mailing list