Westward HTTP [episode]

        我所认识的HTTP

We all know that HTTP hypertext protocol. But more specifically, we should be how to understand the agreement? Some people say that we can say that the analogy of language, because language is the basis of our human communication. Coupled with the current technology family formed HTTP, put it into a language analogy is not an exaggeration, there are a lot of HTTP-based applications, they have to transmit information via HTTP. A typical application is the browser and the Web server. Although the analogy is true, but can not seem to help us to understand HTTP, because our language itself is abstract enough, at least not let us intuitively recognize HTTP is what it is.

To better understand HTTP, we could be traced back to an earlier version of HTTP, at that time still a simple HTTP protocol, provides the basis for Internet communication, in order to cope with the uncertainty of the Internet, we need to design a series of strategies to circumvent the problem while ensuring the smooth transmission of information to solve the problem of a single scene. And this scenario is relatively simple, we can imagine a life example, some people find you borrow money, you will find him to find time to be particularly suitable, for example, you receive just wages, coupled with his victory you borrow money reasons reason not to want to borrow, how much you give up, he had more than dedication, this scene compress your pocket money and your wife exactly the same scene, an adult Ben collapse is to borrow money from the beginning, when you feel hesitation, he they make up a knife, say you give back, so he successfully borrowed your money, you bring an end to wage a brief joy. We borrow money as a scene, to borrow a lot of people consider known and unknown scene, and the process is very properly, he borrowed your money. Particularly want to deal with the whole process of the earlier version of HTTP.

HTTP protocol is the underlying knowledge on the Web, or said network architecture, and Web developers have little chance to touch it, because the B / S architecture, the browser has encapsulated HTTP, we are processing more our business scene.

For now, there is information on the Internet a resource file hundreds of millions of dollars, and these are located in various parts of the world, we can use a computer or mobile phone to access the information via HTTP, because HTTP is a reliable data transfer protocol, such ensures reliable data will not be corrupted or is lost during transmission, which is for Web developers or users is a good thing, developers can focus on developing business.

Web server, also known as HTTP server, because the Web server uses the HTTP protocol, the HTTP server stores most of the data on the Internet, and return the data when there is an HTTP request to the HTTP client, which the client is the most common browsers device.

For Web resources, it can be in any format you can think of, such as text, pictures, audio and video, these resources are usually referred to as static resources, but the point to note is that, in addition to static Web resources, resources can also be software generates resources as needed, such as to produce a different identity based on different content.

There are many types of Web resources, HTTP In order to better identify the different data types, the introduction of media types, also known as MIME
type, which is a data format tag when the browser is available on the Web server to a resource, will first check the MIME type of the resource, so how to deal with this resource. MIME format, typically a large type / subtype.
HTML-formatted text using the text / html to mark, JPEG pictures using image / jpeg marked.
There are hundreds of common MIME.

In order to obtain accurate target resource, HTTP introduced a uniform resource identifier, URI, which is a unique identifier worldwide, HTTP resource file can be located by Uniform Resource Identifier accurately. At the same time, there are two forms of URI, URL and URN.
The URL of, Uniform Resource Locator, is currently the most common form of resource identifiers, describes the location of a particular resource on a particular server. A first portion, the resource access protocol type (scheme); the second portion of the Internet address of the server; the path of the third part, the resource file. For now, URI and URL are equivalent.
URN, uniform resource name, a resource name and relevant, regardless of the resource address. In usage scenarios, by a name, network protocol can be used to do more to visit. But URN is also stored in the pilot phase, there is no large-scale use.

Guess you like

Origin blog.51cto.com/11098813/2437606