Get url part between the domain and the parameters. Example: https://www.domain.com/blog/last-post/?=this%20is%20a%20parameters return: /blog/last-post/
window.location.pathname