First, remember to help the page to lose weight
We browse the Web to actually download the contents of the Web page from the virtual host to the local hard drive, and then explain the view in the browser. Download the speed of the page in the display rate accounted for a large proportion, so the page itself occupies a smaller space, then the faster browsing speed. This requires that when you do the Web page to follow the principles of basics, such as: Do not use too large flash animation, pictures and other resources. A clean, concise page gives a sense of clarity.
Second, if not necessary, try to use static HTML page
As we all know, ASP, PHP, JSP and other programs to achieve the Dynamic Web page information interaction, it is really very convenient to run, because their data interaction is good, can easily access, change the content of the database, so that the site "move" up, such as: Forum, message board and so on. However, this kind of program must first be processed by the server, generate HTML page, and then "send" to the client browsing, this will have to consume a certain amount of server resources. If you use this type of program on a virtual host too much, the page display speed will be slow, so there is no need, please try to use static HTML page.
Third, avoid the entire page content into a table
This is the problem of web design, a lot of webmaster in order to pursue the page unified alignment, the entire content of the page into a table (table), and then by the cell TD to divide the layout of each "block", the display speed of this site is absolutely slow. Because the table to wait for all the contents are loaded after the display, if some content is inaccessible, it will delay the entire page access speed. The right thing to do is to split the content into a few table with the same pattern, not all in a table.
Four, the ASP, ASPX, PHP and other files access to the. JS Reference
This is in ASP, ASPX, PHP and other programming should pay attention to, if you want to embed dynamic data in the static HTML page, and these dynamic data is provided by ASP, PHP and other programs, will use the following statement reference: So, every time a person visit your site, The server will execute and process a tongji.asp file, extract the corresponding data from the database, and then output to the Web page display, if tens of thousands of people visit at the same time, it is necessary to perform tens of thousands of times, the consequences can be imagined. It is recommended that you dynamically generate data into a 1.js file in these programs, and then refer to the 1.js file on the home page through code such as < SCRIPT src= "Http://www.XXX.com/1.js" ></script>. In this way, the task of data display to the client's browser to do, will not consume the resources of the server, the display speed naturally quickly.
Use an IFRAME to nest another page
If you want to insert some advertising code on the site, and do not want to let these advertising sites affect the speed, then the use of IFRAME is the most appropriate. The method is: Put the advertising code to a separate page, and then in the homepage with the following code to embed the page, so that will not because the delay of the advertising page dragged the entire home page display, the code is as follows: where http://www. XXX.com is the referenced file path.
Six, pay attention to the site counter code placement skills
In the Web page to place counters can be statistical site traffic, for webmasters and advertisers to provide access to the basis, but no matter how powerful the function of the site statistics system, there will be a failure. If you put the statistic code directly in front of the page, or in a table or div tag, then when the counter is inaccessible, the table or div on your page will have a delay of 10 seconds, causing the page to be accessed for a long time. So, to improve the speed of the website, we must pay attention to the location of the statistics code placement, the correct way is: Put the statistics code to the bottom of the page, and not with the content of the page in a table or div tag. You can place the statistic code directly at the bottom of the page code, or make a table or div to place the counter separately. In this way, the speed of your website will not be affected when the counter is inaccessible.
The knowledge of Friendship link
Links between the site can increase the publicity of the site, do logo picture links More accurate description of the theme of the site and positioning, publicity will be greatly enhanced, but the picture links do too much, will inevitably affect the speed of the page display. A lot of webmaster like to directly quote the picture URL on the friendship website, so that the picture must be loaded before it can be displayed, the access speed of each friendship site is different, the entire form must wait for the picture to be displayed, so that the speed of the page is greatly reduced. Therefore, do the friendship link should try to do:
1. Only text links: Do text links will not delay the speed of the Web page.
2. Put all the links on a separate page and then link to the page on the homepage.
3. If the link must appear on the first page, please put the entire table of the link to the bottom of the page, because the page is displayed from top to bottom line by row, put it to the bottom of the page, will not delay the display of other content.
4. The logo image of the link to download and then upload to their own web space, so that the speed by their own web site space decisions and not affected by the friendship site.
In short, web site speed optimization There are many ways, especially in the initial construction of the site to use static page to show + architecture, only in this way can fundamentally improve the speed of Web site access.