profile-img
millo

Categories

All Posts
webrtcgatsbydockerjavascriptnetworktypescriptgoraspberrypipythonnodejsandroidreactnative
small-profile-img
millo
small-profile-img
millo
profile-img
millo

Categories

All Posts
webrtcgatsbydockerjavascriptnetworktypescriptgoraspberrypipythonnodejsandroidreactnative
network

[Network] Differences between URI and URL

Wed Mar 03 2021

URL
URI
URL and URI

1. Introduction

Recently, I have been reading a lot of network-related web documents or books, and I write a posting to organize it once because it is so confusing to call it a URL in some parts and URI in others. When looking at it without knowing it, it seems to be similar in shape, but I wonder what the difference is. From now on, let's find out the difference clearly.

2. What is URI(Uniform Resource Identifier)?

Uniform Resource Identifier (URI)
 consists of a string of characters used to identify or name a resource on the Internet

3. What is URL(Uniform Resource Locator)?

Uniform Resource Locator (URL)
 colloquially termed a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it.

Most importantly, the URL is included in the URI.

url

4. Example of separating URI and URL

  1. https://example.io is a URL and URI because it represents a server named https://example.io.

  2. https://example.io/images is a URL and URI because it refers to the location of resources on the network called images on the example.io server.

  3. https://example.io/images/dog.jpeg is a URL and URI because it points to dog.jpeg under the images directory on the example.io server.

  4. For https://example.io/user/123, the URL is https://example.io/user and includes identifier 123 to reach the desired information, which is a URI. In other words, it is a URI but not a URL.

  5. https://example.io/profile?id=11 is also a URL to https://example.io/profile, but includes an identifier ( ?id=11) to reach the desired information, which is a URI. In other words, it is a URI but not a URL.

[References]