jQuery Session Keep Alive

Use the setInterval JavaScript method to create a timer that jumpstarts the user session after a specified period of time by calling a server-side script.
<script>
	setInterval(function() { 
		jq.ajax({ url: '/anyServerSideScriptThatUsesSessions' }) 
	}, 1200000); // 20 min
</script>
Posted by
Snippet Viewed 3018 times.

Share your jQuery code snippets:

  • Get some recognition & link back to your site.

 

Submit | Browse

Most Recent jquery snippets

Most Viewed