What's the difference between a URI and a URL?
2014-08-25 11:22
507 查看
URI s
identify and URL s
locate; however, locators are also identifiers, so every URL is also a URI, but there are URIs which are not URLs.
Roger Pate
This is my name, which is an identifier. It is like a URI, but cannot be a URL, as it tells you nothing about my location or how to contact me. In this case it also happens to identify at least 5 other people in the USA alone.
4914 West Bay Street, Nassau, Bahamas
This is a locator, which is an identifier for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as
"resident of..". In this case it uniquely identifies me, but that would change if I get a roommate.
I say "like" because these examples do not follow the required syntax.
From Wikipedia :
In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In
popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI, ... [emphasis mine]
Because of this common confusion, many products and documentation incorrectly use one term instead of the other, assign their own distinction, or use them synonymously.
My name, Roger Pate, could be like a URN (Uniform
Resource Name), except those are much
more regulated and intended to be unique across both space and time.
Because I currently share this name with other people, it's not globally unique and would not be appropriate as a URN. However, even if no other family used this name, I'm named after my paternal grandfather, so it still wouldn't be unique across time. And
even if that wasn't the case, the possibility of naming my descendants after me make this unsuitable as a URN.
URNs are different from URLs in this rigid uniqueness constraint, even though they both share the syntax of URIs.
identify and URL s
locate; however, locators are also identifiers, so every URL is also a URI, but there are URIs which are not URLs.
Examples
Roger PateThis is my name, which is an identifier. It is like a URI, but cannot be a URL, as it tells you nothing about my location or how to contact me. In this case it also happens to identify at least 5 other people in the USA alone.
4914 West Bay Street, Nassau, Bahamas
This is a locator, which is an identifier for that physical location. It is like both a URL and URI (since all URLs are URIs), and also identifies me indirectly as
"resident of..". In this case it uniquely identifies me, but that would change if I get a roommate.
I say "like" because these examples do not follow the required syntax.
Popular confusion
From Wikipedia :In computing, a Uniform Resource Locator (URL) is a subset of the Uniform Resource Identifier (URI) that specifies where an identified resource is available and the mechanism for retrieving it. In
popular usage and in many technical documents and verbal discussions it is often incorrectly used as a synonym for URI, ... [emphasis mine]
Because of this common confusion, many products and documentation incorrectly use one term instead of the other, assign their own distinction, or use them synonymously.
URNs
My name, Roger Pate, could be like a URN (UniformResource Name), except those are much
more regulated and intended to be unique across both space and time.
Because I currently share this name with other people, it's not globally unique and would not be appropriate as a URN. However, even if no other family used this name, I'm named after my paternal grandfather, so it still wouldn't be unique across time. And
even if that wasn't the case, the possibility of naming my descendants after me make this unsuitable as a URN.
URNs are different from URLs in this rigid uniqueness constraint, even though they both share the syntax of URIs.
相关文章推荐
- What is the difference between a URI, a URL and a URN
- CareerCup What is the difference between a computers heap and it's stack?
- What is the difference between '/n' and '/r/n'? /n /r/n的区别是什么
- What is the difference between a URI, a URL and a URN?
- What is the difference between a URI, a URL and a URN
- What is the difference between a = a * (2^3) and a = a << 3?
- The difference between the 'Local System' account and the 'Network Service' account?
- Disaster Recovery, High Availability, and Continuous Availability - What's the Difference?
- The Relation between `skb->len' and `skb->data_len' and What They Represent
- “检查点”、“里程碑”、“基线”的区别与联系是什么? what's the association between check point, mile stone and baseline?
- Green and native threads -- what's the difference?
- The difference between 'typedef' and '#define'
- What is the difference between angle bracket < > and double quotes " " while including header files
- What is the difference between ContentPresenter and ContentControl?
- What is the difference between tag and branch-id?
- What is the difference between procedural and nonprocedural language?
- What is the difference between SSH and SSL?
- What are the difference between DDL, DML and DCL commands?
- what is the difference between the setTimeout and setInterval
- What are the difference between DDL, DML and DCL commands[转]