parse url get url without path code example Example: javascript get url path window.location.pathname