SEO website optimization improves website loading speed
With the continuous improvement of the speed of the Internet, especially the recent thorough anti-monopoly investigation of China Telecom Unicom by the National Development and Reform Commission, the author believes that the speed or tariff of the domestic Internet will be greatly improved. along with Beijing website production As a webmaster, we should first focus on improving the speed of the site in order to keep visitors, so how can we improve the speed of the site itself? The author will share three experiences in this regard. 1: By simplifying the script and CSS file of the site
One of the ways to improve the loading speed of the website is to simplify the code of the website and slim down the website. Of course, to implement this order, you need to have a code base, but what about people who, like the author, only know a little about code? It's OK. We can use a free PHP application, Minify, which can help you simplify the code of the website to a certain extent even if you don't understand the code. As long as you install this program on your server, it can help you combine all CSS files, and also have the same effect on your Javascript. Moreover, he can also help you understand some unnecessary blanks or comments on your site to achieve the effect of slimming down the website. And it can compress your final website to a certain extent through GZIP. Of course, the last key advantage is that it is a free and open source program. Take the author's site as an example, as shown in the figure below, there are five js files and one css file on the author's site before using Minify optimization.
The following figure is the picture optimized by Minify.
From the comparison of the two figures, we can see that the original js and css files have been greatly compressed, and the original five js files have been merged into one file, while the speed of the site has also been greatly improved.
2: By optimizing the pictures of the site
Pictures can attract visitors very well, so many sites like to upload a large number of pictures. But a large number of images will slow down the overall speed of the website, so what good methods do we have to optimize the speed of the website without deleting images? Yes, you can edit the picture through Photoshop. When saving the picture, you can save it as a web format picture. Of course, if your pictures are rich in color, you can save them in jpg format. If you want to find a balance between the quality of your pictures and the speed of your website, and if you don't have great requirements for the color and appearance of your pictures, you can directly save them in png or gif format.
3: By controlling the caching of websites
Now most websites generate pages dynamically. You can set your website to High end website construction A static page version is generated on the website page and data query. In this way, users will not have to create dynamic pages on your site every time. If your site uses the wp website building system, you can use the cache control plug-in to achieve this effect. The plug-ins you can use include W3 Total Cache.