Post

URN/URI/URL

Screenshot 2024-08-21 at 22 08 22

What is this? URL or URI? https://www.google.com

answer: both
but being precise, URL.

πŸ“Œ URI

Uniform Resouce Identifier


  • λ¦¬μ†ŒμŠ€μ˜ 이름(μ‹λ³„μž)
  • μ˜ˆμ‹œ: www.google.com
  • URI βŠƒ URL, URN

πŸ“Œ URN

Uniform Resource Name

  • 인터넷 μƒμ—μ„œ μžμ›μ„ κ°€λ¦¬ν‚€λŠ” μ‹λ³„μž
  • ν”„λ‘œν† μ½œ, λ¦¬μ†ŒμŠ€ μœ„μΉ˜, 호슀트 λ“±κ³ΌλŠ” 상관 없이 각 μžμ›μ˜ 이름
  • μ›Ή λ¬Έμ„œμ˜ 물리적인 μœ„μΉ˜λž‘ 상관 없이 μ›Ή λ¬Έμ„œ κ·Έ 자체

  • URN looks like this
    • urn:isbn:9788898392389
    • starts with urn
    • isbn: International Standard Book Numbers

πŸ“Œ URL

Uniform Resource Locator
protocol + URI

  • 인터넷 μƒμ—μ„œ νŠΉμ • μ‹œμ  μžμ›μ˜ μœ„μΉ˜
  • νŠΉμ • μ„œλ²„μ— μžˆλŠ” λ¬Έμ„œ
  • λ¦¬μ†ŒμŠ€μ˜ 이름 + μœ„μΉ˜(μ–΄λ–»κ²Œ 도달할 수 μžˆλŠ”μ§€)
  • 즉, protocol이 λ¦¬μ†ŒμŠ€μ— μ–΄λ–»κ²Œ 도달할 수 μžˆλŠ”μ§€ μ•Œλ €μ€Œ
  • μ˜ˆμ‹œ: https://www.google.com

image

πŸ’‘ What happens if the location of a resource changes? What happens to URL?

  • URL indicates location of a resource at a certain time
  • What happens if the location changes?
  • Then, with the old URL, we cannot identify the resource

What are the disadvantages of URL, and how can we overcome?

URL can change if the location of the resource changes.
In order to be able to identify the resource no matter the location,
we can use URN.

  • In order to identity resource regardless of location, use URN.
  • URN gives a unique identifier forever to the resource
  • Even if location of resource changes, can access resource if we know the URN

  • URN looks like this urn:isbn:9788898392389
This post is licensed under CC BY 4.0 by the author.