docs.rodeo

MDN Web Docs mirror

URI path

The path of a URI is the section that comes after the authority. It contains data, usually organized in hierarchical form, to identify a resource within the scope of the URI’s scheme and naming authority.

Syntax

A path consists of a sequence of path segments separated by a slash (/) character:

http://example.com:80<path>
urn:<path>

Description

The path follows the authority and is terminated by the first question mark (?), number sign (#), or the end of the URI. In the following two URIs:

urn:nbn:de:bvb:19-epub-5359-3
https://example.com:80/images/animated/ayse.gif

nbn:de:bvb:19-epub-5359-3 is the path of the URN. /images/animated/ayse.gif is the path of the https URI.

Every URI has a path component, meaning the paths in the following examples are a forward-slash (/) in the first URL and an empty path component in the second:

https://example.com/
https://example.com

Browsers, including the {{domxref("URL")}}  web API, normalize empty paths to /.

Specifications

{{Specifications}} 

See also

In this article

View on MDN