Hello guys, I am back with another coding related article. Today, I am going to explain the difference between an URL and URI. Let’s get into it.
URI (Uniform Resource Identifier)
This might or might not be a new term for you. URI is used to identify a resource. For example, my name can be taken as a URI, since it identifies me.
URL (Uniform Resource Locator)
We all know and use URLs every day. In fact, if you look at your browser’s address bar, you will be able to see the URL for this specific article.
So, URL is used to access a resource’s location. Here are some examples of URLs.
/mine/dream.html (Only useful along with another URL)
URI vs URL
The difference between these two terms is simple. But lot of people get confused with the two terms and use them incorrectly.
As I said, I can take my Name, Thisura, as a URI. But it does not reveal anything about where I live. If we take my address, that is an example for an URL. If you go to my address, you are going to find me.
URL is a subset of URI. A URL can be taken as a URI. But a URI can not be taken as a URL.
Read and learn more about this matter by referring to the articles down below.
Stack Overflow Answers with more detailed explanations (Highly Recommended)
That is it, guys. This was more of a short and simple article. If you want more articles like this, please subscribe to my blog so you will receive notifications when I publish a new post. Thank you for reading the article. Stay safe ✌