What is the difference between URI, URL and URN?

preview_player
Показать описание

00:00 What is a URI?
00:39 What is a URL?
01:13 What is a URN?

URI stands for Uniform Resource Identifier and is an identifier for a physical or abstract resource. However, not every identifier is a URI - there are several syntactic requirements for an identifier to be an URI. E.g. a 36 character UUID (despite being an identifier) is not a URI. Not because it is not unique, but because it does not fulfill the URI syntax requirements.

A URL (Uniform Resource Locator) is a special type of URI. Think of an URL as a subclass of URI. It not only identifies a resource, but also tells you where to find it.

A URN is a special type of URI. Think of it like a subclass of URI. Its goal is to give you a persistent, location-independent identifier. A URN always starts with "urn:" and consists of a Namespace Identifier (NID) and a Namespace-specific part. Just because a string starts with "urn:" does not mean it is a valid URN. To be a valid URN, the Namespace Identifier (NID) needs to be registered in the IANA repository and the Namspace-specific part needs to follow the syntactical rules that are imposed by the Namespace. The rules for the Namespace-specific part need to be present when registering a particular namespace in the IANA repository.
Рекомендации по теме
Комментарии
Автор

Loved the explanation, thank you for sharing and keep the good content flowing :)

radubutucelea