Nowadays, the network is becoming more and more developed, and all kinds of websites have emerged. Today, the speed of webpage loading is facing an urgent crisis. There are also ways to increase the speed of opening a webpage. They are to increase the bandwidth and optimize the computer. In addition, it sounds difficult to optimize the webpage while creating it. We only need to do the following to improve the speed.
Image optimization:
When talking about the problem of image optimization, I think web designers should be very clear. They should try to cut the image smaller and open it faster, as well as reduce the image quality and use the appropriate format, remove unnecessary images (replace the color code with a single color ).
Css optimization:
The birth of css is undoubtedly the savior of the cash network. It makes webpage loading more efficient, and the browsing experience is also improved accordingly, replacing the table. Of course, if you do not know much about css, a large amount of junk code will be generated, which slows down the process.
For example:
Padding-top: 10px;
Padding-right: 20px;
Padding-bottom: 10px;
Padding-left: 20px;
Let's see what the optimized code looks like:
Padding: 10px 20px;
Is there a lot of code missing at once? ^_^
Optimization of adding a slash after a URL:
For example.
Clearly marked image height and width:
I know that many web workers are not doing well on this point. They will be added and not added in the future. Otherwise, if the height and width are not clearly written, the browser will download the entire image and calculate it. If there are too many images, the browser will constantly adjust the page and imagine the speed. The following provides a friendly image code:
This code is indeed very suitable for searching. After the browser gets the height and width, even if the image cannot be displayed, a blank space will be displayed on the page and the following content will be loaded, in this way, the experience is good and the speed is up.
Reduce http requests:
Do not place too many http requests (images, scripts, and so on) on the website. Every object will be loaded with delay. Request reduction method:
(1) reduce unnecessary objects
(2) combine two nearby images into one
(3) Merge the corresponding css
<Link rel = "stylesheet" type = "text/css" href = "/body.css"/>
<Link rel = "stylesheet" type = "text/css" href = "/side.css"/>
<Link rel = "stylesheet" type = "text/css" href = "/footer.css"/>
After merging one:
<Link rel = "stylesheet" type = "text/css" href = "/style.css"/>
Summary: The above summarizes some tips to speed up the web page and remove unnecessary add-ons. If you want to embed widgets from other websites, You must select a quick one if you have any options; use images instead of flash as much as possible; use static images as much as possible; and put the Statistical Code at the end of the page.