URI、URL、URN、、、一体何が違うの?

その他

 
URIとURL、そしてURNはなんでしょう。
 
今までURLって、サイトのアドレスを言う時に使ってましたが、もうちょっと詳しく調べてみました。
 
URI、URL、URN規約は「Uniform Resource Identifiers (URI): Generic Syntax RFC3986」で紹介しています。
 

A URI can be further classified as a locator, a name, or both. The term “Uniform Resource Locator” (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network “location”). The term “Uniform Resource Name”(URN) has been used historically to refer to both URIs under the “urn” scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.
An individual scheme does not have to be classified as being just one of “name” or “locator”. Instances of URIs from any given scheme may have the characteristics of names or locators or both, often depending on the persistence and care in the assignment of identifiers by the naming authority, rather than on any quality of the scheme. Future specifications and related documentation should use the general term “URI” rather than the more restrictive terms “URL” and “URN” [RFC3305].

 
うむ、、、諦めずに読んでみましょう。
 
URI(Uniform Resource Identifier)
 
URIは、ある資源を一つの意味で識別するためのデータ書式を定義した技術標準です。インターネット上で、名前や資源を識別するために使用するものだそうです。
このURIには、URLとURNが含まれます。
 
URL(Uniform Resource Locator)
 
URLは、ネットワーク上に資源がどこにあるのかを教えるの技術標準です。つまり、URLはインターネット上のファイルパスを探して資源を持ってくることです。
もちろん、そのファイルパスに接続するためには、該当URLのプロトコルを知らないと行けません。
「http://, https://, mailto://, file://, ftp://」などのプロトコルを利用します。
 
下記のような形式になります。
http://teamladybird.com
mailto:teamladybird@gmail.com
file://C:/teamladybird.txt

 
URN(Uniform Resource Name)
 
URNは、リソースが存在しないまたは利用できなくなっても、urn:schemeを使用するURIは永続的で独立に維持できます。
そのため、URLはファイルの場所によってURI文字列が変わりますが、URNはファイルがどこに居てもURIの文字列が変わらないです。
 
下記のような形式がURNです。
urn:namespace:the:id:for:file
 
まとめてみると、
URLは必ずURIですが、URIは必ずURLではないです。URI = URLは、違うよってことです。
で、URIは識別子で、資源の名前実体を意味するか、資源の場所を持ってくる方法です。
例えば、URNは建物の名前でURLはその建物の住所ってことです。
 
うむ、一応整理してみましたが、よく分かりませんね、、、涙
 
 
 
 

当サイトは広告を含めています。広告のクリックによる収益は全て当サイトの管理、維持、コンテンツ製作に使われます。

 

Team ladybird
タイトルとURLをコピーしました