Frontend Performance Optimization

Source: Internet
Author: User

1. Use multiple domain names to increase the maximum number of concurrent connections
Large websites have multiple domain names to store different resources, such as IMG, CSS, and HTML. Because browsers only limit the number of concurrent requests for a single domain name, they do not limit the number of concurrent requests for a single IP address, therefore, you can map an IP address to multiple domain names and then use these domain names to access website resources. In this way, the original browser concurrency is 6, and the number of concurrent requests for two domain names can reach 12. However, it should be noted that the more domain names, the better, because domain name resolution also takes time, and too many concurrent requests will consume too much CPU on the client, when the number of domain names reaches a certain level, the web page performance will begin to decline. Therefore, you need to find a balance point based on the actual situation in the application. If not, it is generally better to have 2 to 4.

For more information about browser restrictions, see

 

2. About base64: URL
Base64: the URL is base64-encoded.
The advantage is that HTTP requests are reduced, some files can be solved to avoid cross-domain issues, images are not updated and re-uploaded, And the cache needs to be cleared. However, problems such as browser compatibility, CSS file size increase, and coding cost also exist.

Frontend Performance Optimization

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.