Created
March 21, 2019 02:35
-
-
Save r-k-b/c29d0da65c5198cc238180bd0ea566a3 to your computer and use it in GitHub Desktop.
js one-liner to prevent session timeout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => {fetch('/').then(() => {console.debug('keepalive tick')}).catch(err => {console.warn('tick exploded!', {err})})}, 30e3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment