Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<script language="Javascript">
var timeoutCounter = 0; //counter to compare against
var timeoutInterval = 5; //interval/num seconds between counts so this would be every 5 seconds, 30 would be every 30 seconds, etc
var maxTime = 60 * 20.5; //the 20.5 could easily be input from ASP as <%=yourvar%>
//function to increment timeout
function incrementTimeout(){
timeoutCounter += timeoutInterval;
if(timeoutCounter >= maxTime)
document.href="login.asp"
}
//function to reset timeout
function resetTimeout(){
timeoutCounter=0;
}
//set up an interval for the increment function to be called
setInterval("IncrementTimeout();",1000 * timeoutInterval);
//setup some events that will reset the counter to 0
document.onmousemove=resetTimeout
document.onkeydown=resetTimeout
</script>