Website reconstruction-accelerating webpage Loading

Source: Internet
Author: User

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.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.