You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The usage of the term "hostname" could be clarified in the spec, because the popular usage of the term ("domain name") and URL IDL usage of the term ("domain name or IP address") seem to clash.
Popular usage
In popular usage, as far as I can see, "hostname" seems to refer to a DNS domain name. E.g., from Wikipedia:
(sidenote: an interesting language quirk: "hostname" v.s. "host name")
URL spec usage
In the current version of the WHATWG URL spec, the term "hostname" seems to refer to the term "host" as defined by the spec itself, i.e., domain or IP address (I'm not counting edge-cases like opaque host here for simplicity). Note that "IP address" was added to the mix of "hostname", while popular usage uses "hostname" (or "host name") as a mapping to "IP address", not as (including) an IP address.
I can find the usage of "hostname" in two places in the URL spec:
That is, the last case of an IP address being considered a "hostname" is not in sync with popular usage.
Possible resolution
Maybe a note explaining, e.g., "it's just the historical reasons the URL API acts this way", would avoid confusion amongst the readers between terms like "host" and "hostname".
What is the issue with the URL Standard?
The usage of the term "hostname" could be clarified in the spec, because the popular usage of the term ("domain name") and URL IDL usage of the term ("domain name or IP address") seem to clash.
Popular usage
In popular usage, as far as I can see, "hostname" seems to refer to a DNS domain name. E.g., from Wikipedia:
Also see RFCs related to DNS, e.g. section 2.1 of RFC1123 (emphasis mine):
Or RFC1034, referenced by WHATWG URL spec itself in "domain" concept:
(sidenote: an interesting language quirk: "hostname" v.s. "host name")
URL spec usage
In the current version of the WHATWG URL spec, the term "hostname" seems to refer to the term "host" as defined by the spec itself, i.e., domain or IP address (I'm not counting edge-cases like opaque host here for simplicity). Note that "IP address" was added to the mix of "hostname", while popular usage uses "hostname" (or "host name") as a mapping to "IP address", not as (including) an IP address.
I can find the usage of "hostname" in two places in the URL spec:
hostname stateas an aliashost state(as having caused confusion in Clarify whether "host state" does nothing or is an alias of "hostname state" #681)hostnameattribute getter and setterFocusing on the second place it is used:
Or more practically:
That is, the last case of an IP address being considered a "hostname" is not in sync with popular usage.
Possible resolution
Maybe a note explaining, e.g., "it's just the historical reasons the URL API acts this way", would avoid confusion amongst the readers between terms like "host" and "hostname".