Home > Common Problem > Reasons why web pages load slowly

Reasons why web pages load slowly

(*-*)浩
Release: 2019-06-10 10:28:56
Original
7318 people have browsed it

The reason why users open web pages slowly is because there is a problem in one of the links or it is not optimized enough.

Reasons why web pages load slowly

Briefly summarize the reasons why the web page opens slowly. The main points are as follows:

1 , Minimum network bandwidth (Recommended learning: PHP video tutorial)

This is the most important factor, that is, the bandwidth that netizens often say is not enough. For the same website, if the bandwidth is high, the access speed will be significantly faster.

The bandwidth of the network includes the server bandwidth of the website location and the client bandwidth. The docking point refers to the export end and the import end (such as the docking point between China Telecom and China Netcom).

2. DNS resolution speed

DNS resolution is the resolution from domain name to IP. People are used to memorizing domain names, but machines only recognize each other's IP addresses. Domain names and IP addresses are corresponding. The conversion between them is called domain name resolution. Domain name resolution needs to be completed by a specialized domain name resolution server.

DNS resolution includes the number of round-trip resolutions and the time spent on each resolution. The product of the two is the total time spent on DNS resolution. Many people ignore the factor of DNS resolution. In fact, it is also very important for the website resolution speed.

3. Server and client hardware configuration

Under the same network environment, the computing power of the dual-core server must be stronger. Also on the client, under the same network environment, if you use an Intel i7 processor or an i3 processor to open the same page, the speed will be different.

4. Server software

On the server side, the number of installed software and whether the operation is stable will affect the server environment and thus the network speed. For example, if the server is configured with a software firewall, the network speed will be affected.

5. Page content

If the web page contains a large number of unprocessed images, and these images are large, it will cause the opening speed to slow down. Others, such as Flash and film and television files, will affect access speed.

At the same time, redundant code is also one of the factors that slows down the website. Webmasters need to optimize the code as much as possible and use the least code to achieve the best results.

6. Database operation

Database operations on small websites will also affect the speed of the website, especially when many users submit comments at the same time, the operation database will lock up. , causing the website to fail to open.

7. Use javascript special effects

It is taboo to use javascript special effects on the website. Not only will it not be crawled by search engines, but it will also cause continuous requests to the server. This results in increased server burden and website slowdown.

Specific examples include mouse special effects, program special effects, status bar special effects, etc. The principle of these special effects is that they are first downloaded from the server to the client's machine, then run on the local machine, and finally seen by the user. There are too many special effects, and it takes a long time to run on the user's local machine to complete them all. The merge of css and js.

8. Excessive citation of content from other websites

For example, citation of images, video files, etc. from other websites. If the linked website is slow, or even the website no longer exists, then users will be very slow to open the web page.

9. Back-end issues

The request is too long, the number of requests is too many, and a certain request takes too long (the most likely ones are: a) The resource is on a third-party site and they are very slow; b) This resource is too large; c) There is a problem with the domain name used by this resource. ).

10. Network issues

Look carefully at a single http request. They will be divided into several sections, namely domain name resolution, establishing connection, sending request, and waiting. There are several stages of responding and receiving data. In theory, domain name resolution and connection establishment should take up very little time, and the main time should be spent on the following stages.

11. Receiving data takes too long

As mentioned above, most of the time of the http request should be spent in the later stages, such as waiting for response and receiving data . However, if the time to receive data is too long, hundreds of milliseconds or even seconds, that is also a problem. This situation is usually caused by the downloaded content being too heavy, such as large pictures, large scripts, etc. This type of problem can be solved using GZIP compression, image compression, or JS/CSS minify.

12. JS blocking request

There is a large gap between two consecutive requests in the picture. Why does this gap appear? It may be that there is a problem with the performance of the js written. It takes a long time to parse and execute the js, causing the resource loading during this period to be blocked.

For more PHP related technical articles, please visit the PHP Graphic Tutorial column to learn!

The above is the detailed content of Reasons why web pages load slowly. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template