Get protocol, domain, and port from URL September 13, 2022 by Tarik const full = location.protocol + '//' + location.host;