HTTP and HTTPS

Source: Internet
Author: User

1, HTTP first, HTTP is a network protocol that is designed to transfer Web content. For example, you visit my blog's homepage, the browser address bar will appear the URL: http://program-think.blogspot.com/. The bold part refers to the HTTP protocol. Most Web sites use the HTTP protocol to transfer web pages, as well as various things (images, CSS styles, JS scripts) that are contained on Web pages. 2, Ssl/tlsssl is "secure Sockets layer" of the abbreviation, Chinese "Secure Sockets". It was designed by Netscape in the middle of the 90 century. Because the HTTP protocol used on the internet is plaintext, there are a number of drawbacks-such as the fact that the transmitted content is peeping (sniffing) and tampering. The invention of the SSL protocol is to solve these problems. By the year 1999, SSL has become a de facto standard on the Internet because of its wide application. The IETF standardized SSL in that year. The name after normalization is changed to TLS (the abbreviation for "Transport Layer Security"), and Chinese is called the "Transport Layer secure Protocol". SSL/TLS The two can be seen as different stages of the same thing. 3, Httpshttps (full name: Hyper Text Transfer Protocol over secure Socket Layer), is a security-targeted HTTP channel, simply speaking is the security version of HTTP. That is, the SSL layer is added under HTTP, the security base of HTTPS is SSL, so the detailed content of encryption needs SSL. It is a URI scheme (abstract identifier system) with syntax similar to http: System. For secure HTTP data transfer. Https:url indicates that it uses HTTP, but HTTPS has a different default port than HTTP and an encryption/authentication layer (between HTTP and TCP). The system was originally developed by Netscape (Netscape) and built into its browser Netscape navigator, providing an authentication and encryption method of communication. What we usually call the HTTPS protocol, in fact, is the "HTTP protocol" and "SSL/TLS protocol" combination.  1, HTTP version and history now we use the HTTP protocol, the version number is 1.1 (that is, HTTP 1.1). Before 1.1, there were two versions of "0.9 and 1.0", with HTTP 0.9 "not" widely used, and HTTP 1.0 being widely used. The relationship between  2, HTTP, and TCP the TCP protocol is HThe cornerstone of the TTP protocol the--HTTP protocol needs to rely on the TCP protocol to transmit data. In the network layering model, TCP is called the Transport Layer protocol, and HTTP is called the application-layer protocol. There are many common application-layer protocols that are based on TCP, such as "FTP, SMTP, POP, IMAP," and so on. TCP is referred to as a "connection-oriented" Transport layer protocol. The transport layer has two major protocols for TCP and UDP. TCP is more reliable than UDP.  3, how does the HTTP protocol use TCP connections? The use of HTTP for TCP connections is divided into two ways: commonly known as "short connection" and "Long Connection" ("Long Connection" also known as "persistent connection") assume that there is a Web page containing a lot of pictures, but also contains a lot of "external" CSS files and JS files. In the "Short Connect" mode, the browser initiates a TCP connection and gets the HTML source code for the page (the TCP connection is closed after the HTML is taken). Then, the browser began to analyze the source of this page, know that this page contains a lot of external resources (images, CSS, JS). Then, for each external resource, and then initiate a TCP connection, the files are obtained locally (again, after each fetch of an external resource, the corresponding TCP will be disconnected) if it is a "long connection" way, the browser will first initiate a TCP connection to crawl the page. However, after crawling the page, the TCP connection does not close immediately, but is temporarily maintained (so-called "keep-alive"). Then the browser analyzes the HTML source code, found that there are a lot of external resources, using the TCP connection just now to crawl the external resources of this page. In the HTTP 1.0 version, "Short Connection" is used by default. By the end of 1995, when the HTTP 1.1 draft was introduced, the Web page was beginning to become complex (more and more pictures and scripts in the Web). At this point in a short connection, the efficiency is too low (because there is "time cost" and "CPU cost" to establish a TCP connection). So, in HTTP 1.1, the default is the "keep-alive" approach.   

HTTP and HTTPS

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.