javascript get hostname and port code example Example: js host without port // host without the port window.location.hostname