Skip to content

Commit

Permalink
Fix page expiry when in sleep mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebronner authored Mar 3, 2024
2 parents 9d360a9 + 3099553 commit f3b6c99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion resources/views/script.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
if ({{ $ageCheckInterval }} > 0) {
setInterval(function () {
if (new Date() - lastCheck >= {{ $ageCheckInterval + $ageThreshold }}) {
location.reload(true);
setTimeout(function () {
location.reload(true);
}, Math.max(0, {{ $ageCheckInterval }} - 500) )
}
}, {{ $ageCheckInterval }});
}
Expand Down

0 comments on commit f3b6c99

Please sign in to comment.