pathname

Returns the Location object's URL's path.

Can be set, to navigate to the same URL with a changed path.

MDN Reference