URI and URL differences in the HTP protocol

Source: Internet
Author: User

URL (Uniform Resource location): Uniform Resource Locator

URI (Uniform Resource Identifier): Uniform Resource Identifier

URI: Can represent a domain, can also represent a resource, is a string format specification, and does not specify the purpose; URL: can only represent a domain, is the specification of the resource location, including the URL server file path

1, URI is a purely syntactic structure, used to specify the different parts of the string that flags the Web resource, the URL is a special case of the URI, it contains enough information to locate the Web resource; Generally speaking, each URL has a URI, but not every URI has a URL, Because the URI also includes a subclass urn (the Uniform Resource Name) , in the Java class Library, the URI class does not contain any method to access the resource, its only function is parsing, and the URL class can open a stream that reaches the resource, supports the flow operation

1.1. Each resource available on Uri:web, such as HTML documents, images, video clips, programs, etc., is located by URI.

The general composition of the URI: access to the resource naming mechanism, the host name of the resource, the name of the resource itself, represented by the path, emphasizing the resource

1.2, URL: Is the internet used to describe the information resources of the string, mainly used in various WWW client programs and server programs; URLs can be used in a uniform format to describe various resources, including files, server addresses and directories, etc.

The general composition of the URL: the Protocol (service mode), the host IP address of the resource (something includes the port number), and the specific address of the host resource, such as the directory and file name

URI and URL differences in the HTP protocol

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.