What is the difference between a URI, a URL and a URN?

前端 未结 30 1303
小蘑菇
小蘑菇 2020-11-22 02:18

People talk about URLs, URIs, and URNs as if they\'re different things, but they look the same to the naked eye.

W

30条回答
  •  时光说笑
    2020-11-22 02:51

    First of all get your mind out of confusion and take it simple and you will understand.

    URI => Uniform Resource Identifier Identifies a complete address of resource i-e location, name or both.

    URL => Uniform Resource Locator Identifies location of the resource.

    URN => Uniform Resource Name Identifies the name of the resource

    Example

    We have address https://www.google.com/folder/page.html where,

    URI(Uniform Resource Identifier) => https://www.google.com/folder/page.html

    URL(Uniform Resource Locator) => https://www.google.com/

    URN(Uniform Resource Name) => /folder/page.html

    URI => (URL + URN) or URL only or URN only

提交回复
热议问题