Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session.TimeOut and refresh times

Status
Not open for further replies.

atferraz

Technical User
Aug 23, 2003
129
0
0
PT
My interest is to guarantee that my users never need to logon again.
Can’t put a session.Timeout to high because of memory on server.
So how can I get the session refreshed before session times out?

Thanks any one
 
one way is to write the cookie. set the expiry property to never for the cookie and read the cookie.

this works provided client accepts cookies (sessions allowed means cookies allowed).

cheerz.
sudhi
 
Another way is to include a meta refresh tag in the <head> section of your page like this:

<head>
<meta http-equiv=&quot;refresh&quot; content=&quot;600&quot;>
</head>

The content part is the number of seconds before the page is reloaded, 10 minutes in this example (600 seconds).

The only problem is that if the user begins a form entry and hasn't submitted by the refresh time, the page will reload and any form entries will be lost.

Set the refresh time to be a little less than your ASP session timeout time to guarantee that the page reloads and the session stays active.
 
by refreshing after sometime (atuomatically), it keeps the session alive and atferraz dont want the memory issues by keeping a lot of sessions alive.

cookies in ur case is good. If u are ready to keep sessions for more longer alive, set the session.timeout property to forever.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top