URI stands for Universal Resource Identifier
URL stands for Universal Resource Locator
URL其實是URI的一個子集,A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:)
I am a posting machine today! Anyway, for a while now I've been quite confused about the difference between URLs (Uniform Resource Locators) and URIs (Uniform Resource Identifiers). I finally decided to do a little research and try and identify the distinction. I found the following at the W3C's Contemporary View of Uniform Resource Identifiers:
"...a URL is a type of URI that identifies a resource via a representation of its primary access mechanism (e.g., its network "location"), rather than by some other attributes it may have. Thus as we noted, "http:" is a URI scheme. An http URI is a URL. The phrase "URL scheme" is now used infrequently, usually to refer to some subclass of URI schemes..."
However, as is typical with W3C documents and specs, there's a little too much technical mumbo-jumbo floating around in that explanation to satisfy anyone who doesn't balance their checkbook in binary, so I kept looking. Kenneth Fly's Web Site provides provided the following:
"URI stands for Universal Resource Identifier and URL stands for Universal Resource Locator. Often times people use the terms interchangably, which is not entirely correct. A URL is a subset of the URI popular protocols. These are protocols (http://, ftp://, mailto:). Therefore all URLs are URIs. The term URL is deprecated and the more correct term URI is used in technical documentation. All URIs are means to access a resource on the Internet and are a a technical short hand used to link to the resource. URIs always designate a method to access the resource and designate the specific resource to be accessed."
So...my terminology is apparently way out-dated and I need to start saying "URI" instead of "URL." Why? Because anything that has been deprecated is bad news (remember the evil <blink> tag?). Now I know, and knowing is half the battle.
來自: