Refreshing Session when timeout

Results 1 to 2 of 2

Thread: Refreshing Session when timeout

  1. #1
    Join Date
    Dec 1969

    Default Refreshing Session when timeout

    What is the best method for keeping the session active when the timout period occurs. I don't want my users to have to relogin if possible, but give them the chance to continue logged in or logoff.

  2. #2
    Join Date
    Dec 1969

    Default You can use this:

    I have used a script similar to this in the past:<BR><BR>&#060;script&#062; <BR><BR>function checkSession(){ <BR> // This is run with a couple of minutes left to go. <BR> // That is better than exactly when it times out. <BR> // Gives the client time to reconnect to the server. <BR> if(confirm("Your session is about to time out.
    Click OK to stop.")){ <BR>;/keepsession.asp&#039;, &#039;wndwKeepSession&#039;, &#039;height=200,width=200&#039;) <BR> } <BR>} <BR><BR>setInterval(&#039;checkSession()&#039;, &#060;%=Session.Timeout%&#062;*50*1000)<BR><BR>&#0 60;/script&#062;<BR><BR>It opens a window which requests a file off the server (keeping the session alive). The keepsession.asp file can literally write back:<BR><BR>&#060;script&#062;<BR>self.close()<BR >&#060;/script&#062;<BR><BR>And that will close the popup. The user will be kept on the same page, but their session will keep.<BR><BR>Craig.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts