Deep optimization tips for improving Website access speed _ HTML/Xhtml _ webpage Creation

Source: Internet
Author: User
The website access speed can directly affect the website traffic, and the website traffic is almost directly linked to the interests of the website. Therefore, the speed of the WebSite becomes a matter of great concern for enterprises and webmasters. Nowadays, there are more and more websites, and the website opening speed of many friends is not ideal. You may be able to open your website quickly, but someone else opens your website, but the speed is full. This may be because the access speed of the Netcom website can directly affect the traffic of the website, and the access traffic of the website is almost directly linked to the interests of the website, therefore, the speed of websites becomes a matter of great concern to enterprises and webmasters. Nowadays, there are more and more websites, and the website opening speed of many friends is not ideal. You may be able to open your website quickly, but someone else opens your website, but the speed is full. This may be caused by problems with China Netcom, China Telecom, and other lines, but most of them are caused by the speed of your website. How can we speed up Website access? Next, let's talk about some key issues and solutions.
Many people use virtual hosts as websites to store webpage files in virtual spaces. However, if there are many pages, the website can be opened very slowly. If this happens, it is better to optimize the webpage code to achieve satisfactory speed than to seek a better space. The following summarizes some practical methods. When creating a homepage, the following methods can greatly improve the webpage speed.
   I. Remember to help the page to lose weight
Browsing the Web page downloads the web page content from the VM to the local hard disk, and then explains it in the 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.
   3. Do not insert 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 dynamic data needs to be embedded 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. go to the js file, and then go to the homepage through <SCRIPT src = .. /.. /"http://www.aaa.com/Your js file specific name"> </SCRIPT> such code to reference this js file. In this way, the data display task is handed over to the browser of the client, which does not consume server resources. The display speed is naturally very fast!
5. Use iframe to nest another page
For example, if you want to insert some advertisement code on the homepage and do not want these advertisement websites to affect the speed, iframe is the best choice. For example in http://www.aaa.com /Insert some ad code on the homepage: place the ad code 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:


Http://www.aaa.com/serverpart.aspis the region of the referenced file.
   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 p label, when the counter cannot be accessed, the Table or p 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 p label as the page content. You can directly place the Statistical Code at the bottom of the page code, or create a Table or p 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.
   8. Website space selection
If the above methods are used and the space access speed is not satisfactory, it may be a problem with the speed of your website space. When selecting a website space, we recommend that you use a dual-line space to avoid latency caused by network problems when other users access the website.
Related Article

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.