Cofounded Host Collective (DiscountASP.net). Cofounded Player Axis (Social Gaming). Computer Scientist and Technology Evangelist with 20+ years of experience with JavaScript!
URI's must start with a scheme (e.g. file, http, ftp) as specified in section 1.1.1 of the RFC you linked to.
A scheme may or may not be associated with a protocol which is where your confustion may be coming from. For instance the schemes 'http' and 'ftp' are clearly associated with the HTTP and FTP protocols, whereas the 'file' scheme is not associated with any protocol.
“As much as I’d love our code to be fully compliant with the great programming practices of this world, I’d rather have it working — if possible before the heat death of the Universe.”
You could also say that the URL is that part of the URI that never changes, right?
Example: example.com/Project/users/1 example.com/Project/posts
In this case, the URL is “www.example.com/Project”.
Correct me if I’m wrong!
By the way, nice article!
They are both URIs but not URLs, because you do not know where to find them. To be a locator I think you need to specify where I can find it, in this case it should have a protocol.
you have to reverse URL and URI in your graph example.
If I'm reading you correctly, URI (Name) is a subset of URL (Name + location), so the shapes should be the other way round : URL should wrap URI and not the opposite.
... and basically states they are ALMOST equivalent ... but not quite.
The entire RFC3305 is about the confusion about URI, URL and URN and the conclusion is that there needs to be work done to clarify the confusion: tools.ietf.org/html/rfc3305#section-5
Developer advocate, full-stack engineer, startup co-founder & CTO, bringing 15 years of experience in Silicon Valley, including at Google and Yahoo!. Public speaker.
Location
🌐
Education
UC Santa Cruz Extension
Work
Developer Advocate at Weaviate, the open-source semantic search engine
Thank you very much for this post! It definitely clears up a lot on the difference between these two terms. I find it's really important to get the terms right, just so I don't confuse others when explaining my code :)
Retired mechanical engineer dabbling with Vanilla JS and other webdev as a hobby. I don't look for answers in libraries or frameworks as they take the fun out creating your own solutions.
Location
Los Angeles
Education
Engineering, Physics, and Math
Pronouns
Sorry, I don't do delusional pronouns. I was born with a pen is--period.
Work
Retired but formerly at BAE Systems and Northrop Grumman
Fantastic concept for a short article. I give it an A for effort but a D for execution. It provided no examples and based on the confusion lingering in the comments they could have cleared the confusion. It also left me pondering what some examples my look like.
The specification of the URI syntax does not imply anything about
the properties of names and addresses in the various name spaces
which are mapped onto the set of URI strings. The properties
follow from the specifications of the protocols and the associated
usage conventions for each scheme.
URL:
URIs which refer to objects accessed with existing protocols are known as "Uniform Resource Locators" (URLs)
URI is just an abstract syntax to write down 'object reference' in universal way:
scheme:path
path not necessary starts with '//'
and 'scheme' is not necessary an existing protocol
URI, but not URL:
ssn:567-72-5098
Here is more explanation about URLs:
Specific Schemes
The mapping for URIs onto some existing standard and experimental
protocols is outlined in the BNF syntax definition. Notes on
particular protocols follow. These URIs are frequently referred to
as URLs, though the exact definition of the term URL is still under
discussion (March 1993). The schemes covered are:
http Hypertext Transfer Protocol (examples)
ftp File Transfer protocol
gopher Gopher protocol
mailto Electronic mail address
news Usenet news
telnet, rlogin and tn3270 Reference to interactive sessions
wais Wide Area Information Servers
file Local file access
For exaples and a more detailed analysis pertaining the origins and sometimes religious distinction betweeen URI, URL and URN can be found here: danielmiessler.com/study/url-uri
Inclouding exerpts of the RFCs that outlined these terms.
Developer advocate, full-stack engineer, startup co-founder & CTO, bringing 15 years of experience in Silicon Valley, including at Google and Yahoo!. Public speaker.
Location
🌐
Education
UC Santa Cruz Extension
Work
Developer Advocate at Weaviate, the open-source semantic search engine
I was always thrown into confusion when I saw or heard people throw these around. You've made this crystal clear to me now. Thanks a lot for sharing Milecia!
Always wondered. Would have been nice to have seen some examples too :)
dev.to → URI
dev.to with protocol (https, ftp) → URL
tools.ietf.org/html/rfc3986#sectio...
dev.to is not a URI, it is just a domain name.
URI's must start with a scheme (e.g. file, http, ftp) as specified in section 1.1.1 of the RFC you linked to.
A scheme may or may not be associated with a protocol which is where your confustion may be coming from. For instance the schemes 'http' and 'ftp' are clearly associated with the HTTP and FTP protocols, whereas the 'file' scheme is not associated with any protocol.
Hm yes, correct. I think I confused myself :D
Sorry.
If "Your Name" can be an URI, any domain name is an URI too, yes?
Love the graphic! Reminds me of the relationship between squares and rectangles.
What is an example of an URI that is not an URL?
Here's a URI that's not a URL:
example.test.com
The reason that this is not a URL is because this system could respond to different protocols.
This URI could have a URL like any of these:
ftp://example.test.com
example.test.com
example.test.com
Hopefully that makes sense!
I don't think
example.test.comis a valid URI. In RFC3986:URI = scheme ":" hier-part [ "?" query ] [ "#" fragment ]And it didn't say anything about that schema can be ignored. Also ":" seems to be necessary in the definition. Am I thinking wrong?
mailto:email@domain.comwould be an URI but not a URL.You could also say that the URL is that part of the URI that never changes, right?
Example:
example.com/Project/users/1
example.com/Project/posts
In this case, the URL is “www.example.com/Project”.
Correct me if I’m wrong!
By the way, nice article!
They are both URIs but not URLs, because you do not know where to find them. To be a locator I think you need to specify where I can find it, in this case it should have a protocol.
Hmm, that makes sense. So my affirmation would be valid if I added the protocol to both of them?
you have to reverse URL and URI in your graph example.
If I'm reading you correctly, URI (Name) is a subset of URL (Name + location), so the shapes should be the other way round : URL should wrap URI and not the opposite.
Why am I the first one to notice ?
You are wrong... commons.wikimedia.org/wiki/File:UR...
There is no formal differentiation that is definitive.
This comes the closest to explaining the difference:
tools.ietf.org/html/rfc3305#sectio...
... and basically states they are ALMOST equivalent ... but not quite.
The entire RFC3305 is about the confusion about URI, URL and URN and the conclusion is that there needs to be work done to clarify the confusion:
tools.ietf.org/html/rfc3305#section-5
Not clear at all, in the context of web development, sorry.
Examples would help, as well as breaking down URLs into their components.
Anyway, this is not a topic worth writing a new post about. There are canonical explanations, such as the one over at Webmasters.
Thank you very much for this post! It definitely clears up a lot on the difference between these two terms. I find it's really important to get the terms right, just so I don't confuse others when explaining my code :)
This was helpful explanation. Exactly what I needed. Thank you!.
Fantastic concept for a short article. I give it an A for effort but a D for execution. It provided no examples and based on the confusion lingering in the comments they could have cleared the confusion. It also left me pondering what some examples my look like.
I refer to tools.ietf.org/html/rfc1630
page 2
URI:
URL:
URI is just an abstract syntax to write down 'object reference' in universal way:
scheme:path
path not necessary starts with '//'
and 'scheme' is not necessary an existing protocol
URI, but not URL:
Here is more explanation about URLs:
Amazing clarification. Thank you..
For exaples and a more detailed analysis pertaining the origins and sometimes religious distinction betweeen URI, URL and URN can be found here: danielmiessler.com/study/url-uri
Inclouding exerpts of the RFCs that outlined these terms.
Yes helpful article
You're joking, right? Or spamming.
THIS is a clear, detailed explanation: webmasters.stackexchange.com/quest...
Ran into this exact question a month ago. Your explanation is way easier than what I could find then.
URI is unique name for specific resource.
URL is the location of the specific resource
I was always thrown into confusion when I saw or heard people throw these around. You've made this crystal clear to me now. Thanks a lot for sharing Milecia!
thanks
imho about the use of terms:
w3c allows to use both variants without a difference
w3.org/TR/uri-clarification/#recom...
danielmiessler.com/study/differenc...
That's the best available article for URL vs URI on web.
The tenth time I've looked up this distinction. Thanks!
The clearest, most concise explanation of the topic that I've seen thus far. Many thanks! 👏
Thanks, However I can't tell if my eyes are bent or the circles are 👀