What’s an easy way to get the url in the current window minus the domain name? February 27, 2023 by Tarik alert(window.location.pathname); Here’s some documentation for you for window.location.