Skip to content

Commit f3b6c99

Browse files
authored
Fix page expiry when in sleep mode.
2 parents 9d360a9 + 3099553 commit f3b6c99

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resources/views/script.blade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
if ({{ $ageCheckInterval }} > 0) {
2828
setInterval(function () {
2929
if (new Date() - lastCheck >= {{ $ageCheckInterval + $ageThreshold }}) {
30-
location.reload(true);
30+
setTimeout(function () {
31+
location.reload(true);
32+
}, Math.max(0, {{ $ageCheckInterval }} - 500) )
3133
}
3234
}, {{ $ageCheckInterval }});
3335
}

0 commit comments

Comments
 (0)