JS Test Server speed

Source: Internet
Author: User

The loading speed of the website is very important for a website, its own use from different vendors of the server, the comparison of advantages and disadvantages, the disk, memory space, and so feel is not the case, the main response speed has a relatively large difference, intuitive look more troublesome, so write a simple page directly test loading speed.

The Head section writes the following, noting the start time:

<script>        varnew  Date (). GetTime (); </script>

Then add a picture to the body, the size of the tablet (your-img-size).

Finally insert a section of JS before </body>:

<script>    function() {        var time = (new Date (). GetTime ()- Start)/1000;        var speed = Your-img-size/time;        Alert ("Time-consuming:" + +-"seconds" + "\n\r Speed:" + math.round + "kb/s")    }</script>

Then you can do the Speed test (demo see www.zeakhold.com/speed-test/).

This method is only relatively rough to get the response speed of the server, to complete the speed also have to consider the HTTP status, site resolution time, server connection time, and so on, here can use the home of the Webmaster Ping tool (URL: http://ping.chinaz.com/).

(reproduced please specify the source--http://www.cnblogs.com/zeakhold/)

JS Test Server speed

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.