Javascript most simple network speed detection methods and applications

Author:Anonymous    Updated:2008-3-20 12:14:09
Javascript most simple method of detection of network speed and applications. Network speed is very slow, but in the open FLASH is a very painful thing, especially at the dawn of the Silverlight, this technology may be a bit used. Specific code as follows: <SCRIPT LANGUAGE = "JavaScript"> var starttime = new Date () </ SCRIPT> <img src = "images / ConvLogo.JPG? Id = <% Int (Rnd + 37462 * 32)%>" width = 0 height = 0 onload = "getbandwidth ();">< SCRIPT LANGUAGE =" JavaScript "> function getbandwidth () (var filesize = 3.65 / / measured in KB var l = 2 var endtime = new Date () = var speed Math.round (1000 filesize *) / (endtime - starttime) if (speed> 10) window.location = 'za / default.ASP? ads = enabled' else window.location = 'za / default.asp') </ SCRIPT> img scr this is a picture can be in any, and id is up to imitation Cache impact detection. filesize img scr is the size, and speed is calculated value of Rafah. what the speed of 10 KB? Hey, this time in South Africa, super slow-speed network, so ... this code is very simple and that is to finish a picture of the speed, and this picture is hidden.

Javascript most simple method of detection of network speed and applications. Network speed is very slow, but in the open FLASH is a very painful thing, especially at the dawn of the Silverlight, this technology may be a bit used. Specific code as follows: <SCRIPT LANGUAGE = "JavaScript"> var starttime = new Date () </ SCRIPT> <img src = "images / ConvLogo.JPG? Id = <% Int (Rnd + 37462 * 32)%>" width = 0 height = 0 onload = "getbandwidth ();">< SCRIPT LANGUAGE =" JavaScript "> function getbandwidth () (var filesize = 3.65 / / measured in KB var l = 2 var endtime = new Date () = var speed Math.round (1000 filesize *) / (endtime - starttime) if (speed> 10) window.location = 'za / default.ASP? ads = enabled' else window.location = 'za / default.asp') </ SCRIPT> img scr this is a picture can be in any, and id is up to imitation Cache impact detection. filesize img scr is the size, and speed is calculated value of Rafah. what the speed of 10 KB? Hey, this time in South Africa, super slow-speed network, so ... this code is very simple and that is to finish a picture of the speed, and this picture is hidden.
Previous:asp upload voice
Next:Tomcat JSP classic example of configuration
User Reviews
Site Search
Related Articles
Recommended article
AD