This page is Not Ready

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

hostname

Summary

Sets or retrieves the host name part of the location or URL.

Property of dom/Locationdom/Location

Syntax

var hostName = location.hostname;
location.hostname = hostName;

Return Value

Returns an object of type StringString

The host name component of the URL.

Notes

If no host name is available, this property returns an empty string.

Attributions