-
Notifications
You must be signed in to change notification settings - Fork 4
/
viewport_issue.html
58 lines (53 loc) · 1.71 KB
/
viewport_issue.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!doctype html>
<html>
<head>
<title>Request images small files every 2 seconds to test TCP latency</title>
</head>
<body>
<h1>Request images small files every 2 seconds to test TCP latency in http or https</h1>
<script type="text/javascript">
function getUrlValue(varSearch){
var searchString = window.location.search.substring(1);
var variableArray = searchString.split('&');
for (i = 0; i < variableArray.length; i++) {
var keyValuePair = variableArray[i].split('=');
if (keyValuePair[0] == varSearch) {
return keyValuePair[1];
}
}
}
</script>
<script>
numberOfImages = 3;
if (getUrlValue("images")) {
numberOfImages = getUrlValue("images");
}
https = "yes";
if (getUrlValue("https")) {
https = getUrlValue("https");
}
</script>
<script type="text/javascript">
function sleep(milliseconds){
var start = new Date().getTime();
var keep_looping = true;
while (keep_looping) {
if ((new Date().getTime() - start)> milliseconds) {
keep_looping = false;
}
}
}
</script>
<script>
for (i = 0; i < numberOfImages; i++) {
if (https == "yes") {
document.write("<img src='https://s.yimg.com/dh/ap/default/130909/y_200_a.png?req=5&rnd=" + Math.random() + "'>");
}
else if (https == "no") {
document.write("<img src=http://l.yimg.com/av/curveball/ads/pr/RESIZE/82x82/643a0ed39be1c49502e9ac5a0b519dc7.jpeg?req=5&rnd=" + Math.random() + "'>");
}
}
</script>
<img src ="http://l.yimg.com/av/curveball/ads/pr/RESIZE/82x82/643a0ed39be1c49502e9ac5a0b519dc7.jpeg?static=true">
</body>
</html>