to troubleshoot why a website is slow to open:1 Site Server speed or leased space server speedthe Server space speed is the hardware foundation that the website opens quickly, also is the Precondition. otherwise, even if your site page design is very "slim", the website opening speed will be Discounted. Solution: to find your space quotient to solve or change space quotient. how to detect the speed of the server?method one: The ping command looks at the time and packet drops that are connected to the Server. 1> Click the Start key and select run, then enter CMD in the Run dialog boxnote: Some may be input command, or there may be windows without a DOS System. 2> type ping and the URL you want to test (for example: Ping www.viila.net - t). Then enter and get back the time you accessed the Server. in general, The "PING" command will go on automatically until you make it stop, such as tapping "ctrl + C". If you are familiar with the ability to use ping in telnet, and you have a Telnet account on a different network, you can ping the other hosts (ip addresses or domain names) on a different network basis, and you can compare the response times of those hosts that are accessed at different access points and get "packet loss rate", average response time and other test results. Time: shows when the packet returned after it reached the remote Host. The calculation is positioned in MILLISECONDS. The smaller the number, the faster it Becomes. lost: Packet Loss Situation. TTL: time-to-live Specifies the number of network segments that a packet is allowed to pass before it is dropped by the Router. a good speed of the computer room, the first packet loss rate can not exceed 1%, preferably 1000 without a packet loss, this is the most ideal, but this is not absolute value, as long as less than 1% of all belong to a good routing Situation. second, The ping value is small, the same city of the telecommunications ADSL ping average must not exceed 20, generally in 10, the cross-province ADSL ping average value should be in the 20-40 belong to Normal. the 3rd is the ping value is uniform, if the minimum ping value is only 4, but from now on dozens of, the maximum 79 of the appearance, This is the performance of the route is not stable, the same telecommunications adsl, Although the smallest also has 8, but the largest also only 9, it shows that the route is Stable. method Two: Check the speed at which other sites on the same server are Opened. same IP address site query url:http://indexed.linkhelper.cn/sameip.asp the query tool above allows you to see the number of sites and URLs from the same server. You can see if other websites are open or slow. 2 Telecom and Unicom exchange visits bottleneck Problem. If the space is opened quickly and slowly, and sometimes not open, that is the reason for the instability of space. To find your space quotient to solve or change the space quotient, if in some places open fast, some places open slowly, that should be the problem of network Lines. Telecom Line user access to the website of the Unicom server, Unicom line users to access the website placed on the telecommunications server, relatively speaking, the speed is certainly slower. workaround: If you buy space, it is recommended to buy two-line space or multi-line space. This is not a new concept, most of the virtual host has two or more lines of space, the price is higher, but from the user experience point of view is value for Money. 3 from the site itself to find the problem, the Site's problems include the website design, Web page structure, Web content three Parts. website Design:1> Web page If there is a slideshow effect of the code, you need to review, whether seriously slow down the site opening Speed. 2> If you exclude all aspects of the reasons, you can find the design of the relevant professionals, to see whether the program structure is Reasonable. Web Design structure:1> If it is a table-layout web site, see if it is nested too many times, or a large table and then divided into multiple tables such as page Layouts. Solution: the proposed Div layout, with css, so not only open fast, but also conducive to Modification. 2> If the site has statistical code, online customer service or other JS code to see if it is placed in the last page of the Code. Workaround: It is best to put the Web code at the end of the page, and then execute the code when the site code is Loaded. 3> may have the wrong codeone case is to see if the page code has a picture or file path code that does not Exist. (as shown in Firebug see 20.jpg This image, the red display indicates that the actual does not exist, code to call It) because the picture itself does not exist in space, but in the execution of the code, when the execution of this line, but to continue to load the image, in a subtle way will affect the speed of the Site. another situation is from other sites copied special effects JavaScript code, may be reproduced incomplete, there are many page errors, causing the website to open slowly. Workaround: Fix code errors on the Site. 4> Minimize the use of JavaScript effects. such as: mouse effects, column effects, status bar effects, and so on, the principle of these special effects are first downloaded from the server to your local machine, and then run on the local machine generated, if you watch your Website's user machine configuration low, to run a period of time to Complete. Web Content:1> See whether there are many large-sized pictures in the Web page, if you want to express the picture effect, you can cut the big picture into several small pictures. Picture to lose weight processing, can make the number of bytes smaller, or many of the pictures will occupy a lot of space and make the website open slowly. Can use photoshop, fireworks and other mapping software to reduce the size of the picture, so that the quality of the picture slightly lower, in the picture quality and image size between the search for an optimal ratio. 2> See if there are large-size Flash files in the Web page, excluding the expression effect, try to use less large Flash. 3> Some friends like to add music to the Web page, users open the site, there is background music playback, such things try not to do. the content of other websites is too much referenced in the 4> Content. If you refer to a picture or other content from another website, if that website is slow, or the page of that site is no longer there, the speed of opening will be slower. Solution: Such a problem is common in the case of links in the exchange of images linked to the link to the other sites of the logo image, it is recommended that the Other's logo images uploaded to their own site space, and then add the Link. The second situation is that many friends like to use IFRAME nested other sites on the search, check IP and other small function modules, It is recommended to use less this way. viewing images, code, and more in the website can be viewed using the Firefox plugin tool Firebug Tool. ways to optimize loading speed:first, optimize the picturethere are few pages on which there are no pictures. If you have experienced the age of 56K cats, you will not be very fond of sites with lots of pictures. Because it takes a lot of time to load a Web page like That. even now, the network bandwidth has a lot of improvement, 56K cat gradually fade out, optimize the picture to speed up the page is still necessary. picture optimization includes reducing the number of pictures, reducing image quality, and using the appropriate format. 1, Reduce the number of pictures: remove unnecessary pictures. 2, Reduce the image quality: if it is not necessary to try to reduce the quality of the image, especially the JPG format, reduce the quality of 5% is not very large, but the size of the text changes are relatively large. 3. Common sense uses script files instead of Effects:for example, some web2.0 style, if the use of PS production, each image will basically increase the size of%5-%25 Cost.instead, use JavaScript code to achieve the effect, adding only a few bytes.second, The choice of image formatThere are three types of image formats that are commonly used on web pages, jpg, png, gif. Specific technical indicators in three formats are not what this article explores, we only need to know when to use what format to reduce the load time of the Page. 1, JPG: generally used for the display of scenery, characters, art Photo photographic works. Sometimes it's also used on computer screenshots. 2, GIF: provide less color, can be used in some of the color requirements are not high, such as website logo, buttons, emoticons and so On. of course, an important application of GIF is animated Pictures. 3, png:png format can provide a transparent background, is a special for the web display and invented the image format. Typically used on Web pages that require a transparent background display or a higher quality image. third, optimize the CSSCSS Overlay style sheets make Web pages more efficient to load, and the browsing experience is Improved. With css, table layouts can be retired in a way. but sometimes we use some wordy statements when we write css, like This:copy content to clipboardcode:margin-top:10px;margin-right:20px;margin-bottom:10px;margin-left:20px;you can simplify it to:margin:10px 20px 10px 20px;or this sentence:<p class= "decorated" >a Paragraph of decorated text</p><p class= "decorated" >second paragraph</p><p class= "decorated" >third paragraph</p><p class= "decorated" >forth paragraph</p>you can use div to include:<div class= "decorated" ><p>a Paragraph of decorated text</p><p>second paragraph</p><p>third paragraph</p><p>forth paragraph</p></div>four, after the Web site and slashsome urls, like http://www.viila.net/512 . When the server receives such an address request, it takes time to determine the file type of the Address. If 220 is a directory, you might want to add a slash after the URL to make it http://www.viila.net/512/, so the server can see at a glance to access the index or default file in that directory, This saves load Time. v. Marking height and WidthThis is important, but many people tend to ignore it for laziness or other reasons. When you add pictures or tables to a Web page, you should specify their height and width, which is the height and wide Parameters. If the browser does not find these two parameters, it needs to download the picture while calculating the size, if the picture is many, the browser needs to constantly adjust the Page. This affects not only speed, but also the browsing Experience. here is a more friendly picture code:copy content to clipboardcode:when the browser knows the height and width parameters, Even if the picture is temporarily unable to display, the page will free up the picture, and then continue to load the later Content. So the loading time is fast and the browsing experience is Better.Vi. Reducing HTTP requestswhen the viewer opens a webpage, the browser makes a lot of object requests (images, scripts, etc.), depending on the network latency situation, each object loading will be Delayed. This can take a lot of time if there are many objects on the Page. therefore, you need to offload the HTTP Request. How to lighten the burden? 1, Remove some unnecessary objects. 2, The adjacent two pictures to synthesize a picture. 3. Merging CSS filestake a look at the following code, which requires three CSS files to be loaded:<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"/>we can synthesize it into one:<link rel= "stylesheet" type= "text/css" href= "/style.css"/>thus reducing the HTTP Request. Vii. Other tips1. Remove unnecessary add-ons. 2, If you embed the other Web site widget, If there is a choice, be sure to choose a fast speed. 3, try to use a picture instead of flash, which is also good for seo. 4, Some content can be statically static, to reduce the burden on the Server. 5. Put the statistic code at the end of the page (or use lazy loading).
Why Web sites are slow to load