Using timers ...

Results 1 to 4 of 4

Thread: Using timers ...

  1. #1
    J.-F. Giroux Guest

    Default Using timers ...

    We&#039re actually using a 10 minutes timer (session.timeout = 10) to cancel the connection with the Web server. So, if a user takes more than 10 minutes between two actions, the connection ends and the user gets a message from the system. Instead, we&#039d like to generate a page with a personnalized message and a button for going back to home page. Any help would be greatly appreciated ...

  2. #2
    Join Date
    Dec 1969

    Default RE: Using timers ...

    You can&#039t do this. Think about it, in the web scenario, the web server has no tie to the client whatsoever. The web server sits there, waiting for a client (the browser) to say, "Gimmie this file." That&#039s all. It doesn&#039t know/care if that request came from the same person who issues the last request, or one who issued a request 10 minutes ago. The point is, the server doesn&#039t keep an open channel with the client. So, after ten minutes, the server can&#039t connect to the client and say, "Go to this page," that is backwards.<BR><BR>So, to make a long story short, you can&#039t show HTML, or redirect someone somewhere when their session expires. For all you (or your server) knows, that person has already turned off their computer and is in bed asleep! :)

  3. #3
    jon conrad Guest

    Default RE: Using timers ...

    I would think that a client side script could be invoked whenever a page is called, running a timer so that an alert could be presented to the user before the session timed out. The alert could tell the user to perform some action that reinitiates the timeout period. An include file could be placed at the top of every page to run this script.<BR><BR>Just a concept. I haven&#039t coded for this.

  4. #4
    Join Date
    Dec 1969

    Default RE: Using timers ...

    What u can do is have a session variable and give it some value on session_onstart() event of global.asa then<BR>IN begining of each page check the session variable if its empty then it means that the user has timed out,redirect him to a page saying that u have timed out<BR><BR>&#060;% if session("user")="" then<BR>response.redirect"timedout.asp"<BR>end if<BR>%&#062;<BR>the rest of the script below this

Posting Permissions

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