Skip to content

Public Suffix API #528

@eligrey

Description

@eligrey

I propose that eTLD+1 should be exposed to web content through location‍.site and new URL('…').site.

Webapps shouldn't have to embed the Public Suffix List (currently 222KB!) to lookup eTLD+1 when our browsers already have a copy.

API examples:

location.href === 'https://github.com/whatwg/url/issues/528'
location.site === 'github.com'

new URL('https://subdomain.google.co.uk').site === 'google.co.uk'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions