First, the resource consolidation and compression

In terms of DNS? In the browser level or even the router level caching DNS server-related information, access the DNS lot of time can be shortened.

Network requests? When using CDN, caching and network selection to solve the problem, CDN for static resources, but the network requests for static resources or will to bring cookie, this cookie is actually a loss of time on the network, so hopefully requests for static resources when cookie will be removed. CDN domain name is not the same with the master station can make the cookie will not carry.

bandwidth? How to reduce the size of a HTTP request, and it is a very important point.

react and other frameworks? Side rendering service straight out of HTML, HTML-rendering on the server.

Resources combined with the compression which involves optimization points:

Http merger is to reduce the number of requests to reduce the size of the resource request is compressed.

HTML compression

 

The html-minifier node.js involves a lot of configuration parameters to configure whether to compress the comment, whether to compress the HTML js, css. As a node when the build tool, you can build in HTML compression layer, if the nodejs as a server language, then it comes to server compressed manner. On the one hand is the construction phase, on the one hand is the server.

 

 

Guess you like

Origin www.cnblogs.com/QianDingwei/p/11025453.html