Slow webpage loading and some solutions

Source: Internet
Author: User

The speed at which we open web pages on the Internet has been a headache for many of our friends. Why are some computers having fast browsing speed at the same machine and network speed so comfortable, some of my friends have seen that surfing the internet is so refreshing, but here I am smashing the keyboard and blaming my machine for its low configuration. In fact, this is not the case. Here I personally summarized some practical methods. When creating a homepage, the following methods can greatly speed up your webpage and share them with you!

I. Remember to help the page to lose weight

We browse the Web page to download the web page content from the VM to the local hard disk, and then explain it in a browser. The speed of downloading a Web page accounts for a large proportion of the display speed. Therefore, the smaller the space occupied by the web page itself, the faster the browsing speed. This requires that you follow the principle of simplicity when creating web pages, such as: Do not use too much Flash animation, images and other resources. A clean and concise page will give you a clear idea.

Ii. Try to use static HTML pages if necessary

As we all know, ASP, PHP, JSP and other programs realize dynamic interaction of web page information, which is indeed very convenient to run, because their data interaction is good, you can easily access and change the database content to make the website "dynamic", such as forums and message boards. However, such programs must first be processed by the server, generate HTML pages, and then "send" them to the client, which consumes a certain amount of server resources. If you use too many such programs on the VM, the webpage display speed will be slow, so it is not necessary. Please try to use static HTML pages. For more information, see

3. Avoid inserting the entire page content into a Table.

This is a problem with Web page design. Many webmasters put the content of the entire page into a Table in pursuit of unified page alignment, then, the cell td is used to divide the layout of each "Block". The display speed of such websites is absolutely slow. Because the Table is displayed only after all the content is loaded. If some content cannot be accessed, the access speed of the whole page will be delayed. The correct method is to split the content into several tables with the same pattern. Do not add all the contents to a Table.

4. Change ASP, ASPX, PHP, and other files to. js references.

This should be noted in programming such as ASP, ASPX, and PHP. If you want to embed dynamic data in Static HTML pages, if these dynamic data is provided by ASP, PHP, and other programs, it will be referenced using the following statement: in this way, every time someone visits your website, the server will execute and process tongji once. asp files, extract the corresponding data from the database, and then output the data to the web page. If tens of thousands of people access the data at the same time, tens of thousands of times are required. We recommend that you dynamically generate data to a 1. js file, and then on the home page through the <script src = ""> </script> such code to reference this 1. js file. In this way, the data display task is handed over to the browser of the client, which does not consume server resources and the display speed is naturally fast;

5. Use iframe to nest another page.

If you want to insert some advertisement code on your website and do not want these websites to speed up, iframe is the best choice. The method is: place these ad codes on an independent page, and then embed the page with the following code on the homepage, in this way, the display of the entire homepage will not be dragged due to the delay of the advertisement page. The Code is as follows:

<Iframe align = "center" width = "780" height = "30" name = "all" scrolling = "no" marginWidth = 0 frameborder = "0" src => </iframe>

The is the Referenced File Path.

6. Website counter code placement skills

Placing a counter on a webpage can count Website access traffic and provide access basis for webmasters and advertisers. However, no matter how powerful the website statistics system is, there will be faults. If you directly put the Statistical Code in front of the page content, or put it in a Table or div label, when the counter cannot be accessed, the Table or div on your page will have a delay of dozens of seconds, resulting in a long time before the page can be accessed. Therefore, to speed up the Website, you must pay attention to the location of the statistics code. The correct method is to place the statistics code at the bottom of the page, and do not use the same Table or div label as the page content. You can directly place the Statistical Code at the bottom of the page code, or create a Table or div at the bottom to place the counter. In this way, when the counter cannot be accessed, your website speed will not be affected at all.

7. Knowledge of friendship links

Links between websites can increase the promotion effect of websites. LOGO image links can more accurately describe the themes and positioning of websites. The promotion effect will be greatly enhanced, but there are too many image links, it will inevitably affect the display speed of the webpage. Many webmasters like to directly reference the image URLs on the friendship websites so that the images can only be displayed after being loaded. The access speed of each friendship website is different, the entire table can be displayed only after the image is downloaded, which greatly reduces the speed of the webpage. Therefore, we should try our best to do the following for friendship links:

1. Only text links: text links do not delay the speed of webpages.

2. Place all links on an independent page, and then click the page on the homepage link.

3. if the link must appear on the homepage, place the entire Table of the link at the bottom of the page, because the page is displayed from top to bottom row by row, place it at the bottom of the page without any delay in displaying other content.

4. The LOGO image of the link is downloaded first and then uploaded to Your webpage space. In this way, the speed is determined by your website space and is not affected by the website space.

In short, there are still many ways to optimize the website speed, especially in the initial construction of the website, the architecture of static page display + should be adopted. Only in this way can the Website access speed be fundamentally improved.

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: 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.