All three URI, URL, and URN are used to establish any useful resource or identify on the web, however there’s a refined distinction between them. URI is the superset of each URL and URN. By the way in which, the principle distinction between URL and URI is protocol to retrieve the useful resource. URL at all times embody a community protocol e.g. HTTP, HTTPS, FTP and so forth to retrieve a useful resource from its location. Whereas URI, in case of URN simply uniquely identifies the useful resource e.g. ISBN numbers that are instance of URN is used to establish any guide uniquely. On this article, we’ll briefly see what’s URI, URL, and URN after which see the principal distinction between URI, URL, and URN.
What’s URI
What’s URL
What’s URN
URN stands for Uniform Useful resource Identify. URN can be the subset of URI. Probably the greatest examples of URN is ISBN quantity which is used to uniquely establish a guide. URN is totally completely different than URL because it does not embody any protocol.
Distinction between URI, URL, and URN
After realizing what’s URI, URL, and URN, it is simple to search out the distinction between them. The principle distinction between URI and URL is that each URL is a URI however not vice versa. Equally, each URN is a URI, however the reverse is just not true. One other distinction between URI and URL is that URL consists of the protocol, which is essential to retrieving data from any location. Listed here are few variations between URI, URL and URN in level format:
Here’s a diagram that clearly replicate the connection of URL, URI, and URN on the web:
That is all on the distinction between URI, URL, and URN. It’s good to understand how a lot distinction they’re although you largely have to cope with URL.
Different Interview questions from Java67 Weblog