views:

10

answers:

0

I'm looking to warn the user when his or her session times out (I'm having weird timeout problems) and I found the following code:

<% 
advanceWarning = 2 
jsTimeout = (session.timeout - advanceWarning) * 60000 
%> 
<script> 
window.setTimeout("alert('Session is about to expire');",<%=jsTimeout%>); 
</script>

Is this reliable?