Skip to content

Instantly share code, notes, and snippets.

@r-k-b
Created March 21, 2019 02:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r-k-b/c29d0da65c5198cc238180bd0ea566a3 to your computer and use it in GitHub Desktop.
Save r-k-b/c29d0da65c5198cc238180bd0ea566a3 to your computer and use it in GitHub Desktop.
js one-liner to prevent session timeout
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