Large site technical architecture, Web front-end performance 4 high-performance architecture of the website optimization

Generally speaking front-end Web site refers to the part before the business logic, including the browser to load, view model site, photo services, CDN services, major optimization methods have optimized browser access, use reverse proxy, CDN and so on.

 

4.2.1 browser access optimization

1, to reduce http requests

 Merge CSS, merger Javascript, merge pictures

2, using the browser cache

For a more low-frequency resources, by setting the Cache-Control and Expires HTTP header attributes, you can set your browser cache, the cache time can be days, or even months.

 

Use the browser cache when updating website strategy of static resources should be used to update the batch method, such as the need to update the icon file 10, not the 10 file updates all at once, but rather a gradual update file a document, and a certain interval, the user's browser in order to avoid sudden and massive cache invalidation, centralized update the cache, server load caused by a surge in cases of network congestion.

 

3, enable compression

 

4, CSS on the top of the page, Javascript on the bottom of the page

 

5, to reduce the transmission Cookie

 

4.2.2 CDN acceleration

CDN (Content Distribute Network) is still essentially a cache, and data cache closest to where the user, allowing users to get data at the fastest speed, that is, network access to the first jump.

 

Guess you like

Origin www.cnblogs.com/wozixiaoyao/p/11465137.html