-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
24 lines (23 loc) · 866 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ios-webkit-background-throttling-sandbox</title>
<script type="text/javascript" src="script.js"></script>
</head>
<body style="font-family: sans-serif">
<p>
Click to start using <code>setTimeout</code> with a callback to make a simple HTTP request every 2000ms.
</p>
<button id="start1" onclick="main(false)">START</button>
<hr />
<p>
Click to start making requests (as above) but using the Visibility API and <code>AbortController</code> to workaround the issue.
</p>
<button id="start2" onclick="main(true)">START</button>
<hr />
<h2>Output:</h2>
<div id="output" style="font-family: monospace; background-color: lightgray"></div>
</body>
</html>