window.location.origin vs window.location.host code example Example: js host without port // host without the port window.location.hostname