Get protocol, domain, and port from URL

const full = location.protocol + '//' + location.host;

Leave a Comment