As shown in. In addition, is the result of ajax data acquisition the same as that of pre-loading a webpage? Is the established TCP connection the same as the http request? Is it very resource-consuming if a handshake is performed every time? Is it true that all elements will be put into the same page at the time of release, as shown in the question.
In addition, is the result of ajax data acquisition the same as that of pre-loading a webpage? Is the established TCP connection the same as the http request?
Is it very resource-consuming if a handshake is performed every time? So it would be better to put all the elements into the same page at the time of release?
Reply content:
As shown in.
In addition, is the result of ajax data acquisition the same as that of pre-loading a webpage? Is the established TCP connection the same as the http request?
Is it very resource-consuming if a handshake is performed every time? So it would be better to put all the elements into the same page at the time of release?
Http requests must be sent to every resource, any resource, or load on the page.
Question 1: ajax and pre-loading have different loading orders for resources, but both generate HTTP requests with the same number of resources. The former can first see the page body and then display the local information, the latter is all loaded and then displayed at one time. The application scenarios are also different.
Question 2: If Connection: keep-alive is set for both the HTTP request header and response header, multiple HTTP requests share one TCP Connection. I casually found an article: Explanation of HTTP header and Keep-Alive mode
Question 3: Reference Question 2
Problem 4: The optimization direction of the front-end includes reducing the number of HTTP requests, so there are Optimization solutions such as CSS sprite and Data URL. However, it also increases the complexity of resource maintenance updates.