pathname
URL: pathname
From MDN: "The pathname property of the URL interface represents a location in a hierarchical structure. It is a string constructed from a list of path segments, each of which is prefixed by a / character. If the URL has no path segments, the value of its pathname property will be the empty string."
Notes & further reading
Spec: URL Standard
MDN: URL.pathname
Example value:
const url = new URL("https://elide.dev/hello?one=two#hello");
url.pathname;
← "/hello"
Content copied to clipboard
Note: This property is present on a mutable version of the URL
interface.