Professional Documents
Culture Documents
Uri
Uri
Uri
What is a URI?
A URI — short for “Uniform Resource Identifier” — is a sequence of characters that
distinguishes one resource from another.
A URI or a uniform resource identifier is a string of characters that generally identifies any
web resource by using a name, a location, or both.
For example, foo://example.com:8042/over/there?name=ferret#nose is a URI containing a
scheme name, authority, path, query and fragment.
Types of URI
There are two types of URIs: URNs and URLs
What is Uniform Resource Names (URNs)
A URN is a persistent and location-independent identifier that aims to identify a resource
permanently.
It means the resource remains valid even if its data is moved to another location
URN consists of at least three components:
1- URN – each URN uses the prefix urn: scheme specification.
2- NID – refers to a namespace identifier that should be registered in the Internet Assigned Numbers
Authority (IANA). This may include letters, digits, or a hyphen followed by a colon.
3- NSS – this is a namespace-specific string that identifies the internet resource.
It may contain ASCII codes, digits, punctuation marks, and special characters.
For Example: urn:isbn:0405999832 identifies a book by using the ISBN numbers.
Uniform Resource Locators (URLs
A URL or Uniform Resource Locator is used to find the location of the
resource on the web. It is a reference for a resource and a way to access
that resource.
A URL always shows a unique resource, and it can be an HTML page, a CSS
document, an image, etc.
A URL uses a protocol for accessing the resource, which can be HTTP,
HTTPS, FTP, etc.
It is mainly referred to as the address of the website, which a user can
find in their address bars. An example of an URL is given below:
scheme:[//authority]path[?query][#fragment]
Syntax of URL