Secret script for optimizing server and improving website access speed
Source: Shangpin China |
Type: website encyclopedia |
Time: December 20, 2013
In any period of website operation, website access speed is a crucial part, which is the most basic part of website friendly experience. If the access experience is unsatisfactory, then the marketing promotion model made in the later stage may be futile, because the selection cost of customers in the network is very low, and the patience of common customers is not high, Customers will choose to leave after visiting the page for more than 6 seconds, which is undoubtedly worse for some enterprise websites with low traffic. Since website access speed is so important, today the author also wants to share with you a few ways to improve the speed experience. Although there are many similar articles and views on the Internet, most of them are analyzed inside the website. Today, the author will talk about how to optimize the server Marketing website construction The server increases the speed of website access.
Most website operation optimization personnel know how to improve the access speed through page optimization. When you have completed the optimization operation and found no significant improvement, you should consider whether other factors are causing the slow access speed. For example, the performance of a server that has been used for a long time has declined. In order to ensure that the business is not affected, you may need to upgrade and optimize the server that is being used.
1. Optimize servers in use
Whether it is the upgraded server or the newly purchased server, we should optimize it to improve the performance and utilization of the server. Let's talk about how to optimize the server from four aspects:
Key point 1: reduce DNS query time
It is well known that the domain name and IP address on the network server side correspond to each other. When the client sends a request, the computer also needs to judge by the mutual conversion of the domain name and IP address. This conversion is the domain name resolution DNS. Usually, DNS queries take 10-20 milliseconds, and the client browser will only load the content under this domain name after the DNS query ends. Therefore, if we want to speed up page access, we can improve the DNS query time.
Key point 2: Try to reduce the number of HTTP requests
It takes more time to download various scripts, CSS style sheets, Flash and pictures from the time a customer visits a website page to the time when the entire page content is fully displayed. Each type of download is equivalent to an HTTP request. The more such requests, the longer it takes for the website to be fully loaded, which means that the client's access will be slow, At this time, we need to reduce the number of HTTP requests as much as possible. Usually, we can directly write css and js to the page to avoid external calls; Or we can divide CSS files and JS files and merge them in the background, so that the client browser is equivalent to a request. In a word, we can reduce the number of HTTP requests by reducing the number of calls to various external files.
Key point 3: Recommend large and medium-sized websites to use CDN acceleration tools
CDN acceleration is a page acceleration method commonly used by large websites at present. It has almost no impact on website optimization. The basic principle is to back up website images to many server nodes, so that users around the server nodes can access websites faster, thus improving the experience of clients accessing websites at a high speed; However, not all websites are suitable for CDN acceleration. Generally, small personal websites do not need to use CDN acceleration. After all, this is a big expense in the long run; It is recommended that photo stations and multimedia sites use CDN acceleration.
Point 4: Enable Gzip compression on the server
For large and medium-sized websites, the content of the page is numerous and diversified. The size of a single page may be hundreds of kilobytes or more, and the download will be slow when the client accesses. At this time, we can use the Gzip page compression function of the server to compress a 100K page file to less than 25K, In this way, the number of network transmissions can be reduced to improve the speed of client access. General servers can use Gzip compression function, and can compress JS files, CSS files, and Html to optimize website access speed in many ways.
2. Upgrade the server in use
Shangpin China Website construction company Of course, I want to save you a lot of money, but the fundamental problem is that most enterprises are unreasonable when they choose servers. In addition, at the beginning of website construction, they chose servers with poor scalability to save costs. As a result, even if we upgrade the existing servers, the strength of their performance improvement is still insufficient. At this time, it is necessary to purchase servers again. There are also many skills for server purchase. Here is a simple recommendation. If the user group is domestic, it is recommended to choose a well-known server supplier in China. If the customer group is global, you can choose Hong Kong servers or American servers. In addition, More importantly, we should make reasonable choices according to the characteristics of our industry.
Before upgrading the server, you should consider various issues, and decide whether to upgrade the existing server or purchase new server equipment according to the actual situation. First, upgrade the existing server equipment. Generally speaking, as the business continues to increase in the later period of website operation, the requirements for server performance of the development of multi platform applications also gradually increase. It is reasonable for servers to encounter performance bottlenecks for a long time. In this case, we can upgrade servers (for example, increase hardware equipment or network bandwidth) And other relevant configurations to meet the expanding business needs, then the server performance bottleneck problem can be solved. Let's talk about the purchase of new server equipment. Maybe someone will ask why we need to purchase it again. Can't we upgrade the existing server?
So far, the above mentioned that you can improve the website access speed by optimizing and upgrading the server. If your website's current access experience is poor, you can try the above operations, and I believe it can help you improve this problem.
Source Statement: This article is original or edited by Shangpin China's editors. If it needs to be reproduced, please indicate that it is from Shangpin China. The above contents (including pictures and words) are from the Internet. If there is any infringement, please contact us in time (010-60259772).