I collected some information about website acceleration and made a seriesArticleIt may be switched to or from the network.
(1) graphic processing for web page Acceleration
In the process of website maintenance, you may have encountered such a situation: pages created after hard work, but there are too many images, and the webpage structure and table structure are complex,ProgramLengthy, making loading slow! Web pages cannot be completely displayed in front of viewers.
In the next few articles, I will introduce some experiences in weight loss on the web page. I hope you will discuss them and talk about your point of view!
1. Merge Images
Try to make several images that may be combined into one image. This is because the browser will make individual requests for each image on the webpage. That is to say, if there are five images on the webpage, then the browser will send 5 requests to the Web server, which will inevitably increase the burden on the server, thus slowing down the speed! Except for large images.
2. Specify the width and height
When you insert an image into a webpage, the height and width must be specified, for example, . If this parameter is not specified, the browser cannot determine the image size before downloading the image, and the page submission will be delayed, the request may even be repeated to the web server.
3. Select the image format
Select an appropriate image format. The common formats are jpg and GIF. The two images are compressed in different ways. JPG supports a large number of colors. Generally, JPG format is used for photos or images with significant color changes. You should also select a proper compression ratio and try to compress images without damaging the effect. GIF supports up to 256 colors. It is suitable for small images with less colors. GIF images can be minimized without affecting the image effect. Selecting an appropriate image format will not affect the image size. You can use some image processing software.
4. Image Processing
You must submit images in step-by-step mode. Both GIF and jpg formats support step-by-step submission. images are displayed before the browser receives the complete image information. This looks faster. Save the GIF file as an interleaved format. Select "gradually encode" The JPG file to save the file.
5. Replace text
The alt tag should be used for all images, because many friends disable the image function of the browser to increase the browsing speed. Provides text to help you understand the content of the page.
Finally, it is important to note that content is always used to attract everyone! Therefore, remove unnecessary images as much as possible!
Today, we will discuss the impact of the Structure of webpages and tables on the speed next time!