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