origin property
Returns the URL underlying the current webpage, including protocol scheme, domain, and port number (if any).
This property is read-only.
Syntax
sDetails = window.location.origin;
Property values
Type: String
Hosting details about the current webpage, including protocol scheme, domain, and port number (if any).
See also
Show: