URI and URL Comparisons

Source: Internet
Author: User
Tags gopher
The URL is an abbreviation for the uniform resoure Locator (Uniform Resource Locator). Is the address of the WWW page.
Its URL addresses are arranged in the following format: Scheme://host:port/path
--internet resource type (Scheme): Indicates the tools that the WWW client uses to manipulate. such as "http://" means the WWW server, "ftp://" represents the FTP server, "gopher://" represents the gopher server, and "NEW:" represents the newgroup newsgroup.
--server address (host): Indicates the server domain name or IP on which the WWW page resides.
Port: Sometimes (not always), for access to some resources, give the appropriate server a port number.
Path: Indicates the location of a resource on the server (the format is the same as the format in the DOS system, usually with a directory/subdirectory/filename structure). As with ports, paths are not always required.
The biggest drawback: when the location of information resources changes, the URL must be changed accordingly. So people are studying new ways of representing information resources, such as:
URI (Universal Resource Identifier) is "Common resource Identifier" (see RFC 1630), URN (uniform Resource name), "Uniform Resource Name"
and URC (Uniform Resource citation) is the "Uniform Resource reference character".

URI, is the Uniform Resource identifier, a uniform resource identifier that uniquely identifies a resource. The URL is the Uniform Resource Locator, the Uniform Resource Locator, which is a specific URI, where a URL can be used to identify a resource, and it also indicates how to locate the resource. and Urn,uniform resource name, Uniform Resource naming, is to identify resources by name, such as mailto:java-net@java.sun.com. That is, the URI defines the uniform resource identity in an abstract, high-level concept, and the URL and urn are the specific ways in which the resource is identified. A URL and a urn are both URIs. In the Java URI, a URI instance can represent absolute or relative, as long as it conforms to the grammatical rules of the URI. The URL class not only conforms to semantics, but also contains information to locate the resource, so it cannot be relative and the schema must be specified.

A URL is a specific URI that not only uniquely identifies a resource, but also provides information to locate the resource. URIs are semantically abstract concepts that can be absolute or relative, and URLs must provide enough information to locate them, so it is absolute, and usually the relative URL is for another absolute URL, which is essentially absolute.

Note: the absolute (absolute) here means that scheme is included and the relative (relative) does not include scheme.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.