I have tried to make a label, that when you 'check' it, it will auto-refresh the page every 5 seconds. I found a few threads but didn't get it to work! this is how I have done it so far:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<label>
<input
type="checkbox"
name="refresh"
autocomplete="off"
value="autorefreshoff"
id="refresh-btn"
onclick="refresh()"
/>
</label>
</body>
<script>
//Don't know what do do here, tried this:
function refresh() {
window.location.reload(1);
}
</script>
</html>
I am guessing that I have to make a loop in my javascript code with a delay on? So whenever this label is "checked" its gonna loop through the javascript code every 5 seconds, and if I would turn off the label its gonna stop looping.
Don't know javascript that well unfortunately.