As the speed of the Internet continues to improve, especially the recent Development and Reform Commission on Telecommunications Unicom Antitrust investigation, I believe that the domestic Internet speed or tariffs will have great progress. With the speed of the upgrade, as our webmaster should be committed to improve the speed of the site, in order to keep the visitors, then we can from what several aspects from the site itself to improve speed? The author will share three points of experience in this area.
One: by simplifying the site's scripts, CSS files
Increase the speed of the site's loading is to streamline the site code, for the site slimming. Of course to achieve this you need to have the basis of the code, but for the same as the author of the code is only a smattering of people how to do? It's okay, we can use a free PHP application minify, and even if you don't understand the code, it can help you streamline your site's code to some extent As long as you install the program on your server, he can help you combine all the CSS files, and you can have the same effect on your JavaScript. In addition, he can also clear your site for some unwanted blank or annotation, to achieve the effect of slimming the site. And it can be through gzip to your final website to some extent compression. The last key advantage, of course, is that he is a free and open source program. To the author's site for example, the following figure is not in the use of minify optimization before the picture, the author of the site has five JS files and a CSS file.
The following figure is an optimized picture using Minify.
From the two-figure comparison can be seen, the original JS and CSS files are greatly compressed, and the original five JS files merged into a file, at the same time the speed of the site has also been greatly improved.
Two: By optimizing the site's picture
Pictures can be very good to attract visitors, so many sites like to upload a large number of pictures. But a lot of pictures will drag down the overall speed of the site, then 11545.html "> What do we have to optimize the speed of the site without deleting the picture?" Yes, you can edit the picture in Photoshop and save the picture as a web-formatted picture when you save the image. Of course, if your picture is more colorful, you can save the format as JPG, if you want to find a balance in the quality of your picture and the speed of the website, if the color and appearance requirements for the picture are not very large, you can save the picture file in PNG or GIF format directly.
Third: By controlling the caching of the Web site
Now most of the sites are dynamically generated pages, you can set up to make your site in the Site page and data query to generate a static version of the page. In this way, users do not have to create dynamic pages on your site every time. For your site if the use of WP build station system, you can use the cache control Plug-ins to achieve this effect, you can use the plug-in has W3 total Cache.
Whether the Internet or our site are in continuous improvement. With the user requirements for the speed of the site more and more high, we need to meet the speed of the user's requirements, in order to make our site in a favorable position, I hope that the author's three speed optimization method for everyone to help. This article by the Nanjing website Construction Cool Teng Network http://www.cootem.com/Handwritten original, respect the copyright, reprint please retain the source.
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.