faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Session Variables

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

50 of 65 people (77%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

How can we increase the time of session variable dynamically?

May 22nd, 2000 06:59
unknown unknown, Jim Cruff


Session variables don't necessarily expire after 20 minutes -- or 
whatever the session.timeout value is. They expire after 20 minutes of 
non-use (the user leaves the site or the page remains unused for more 
than 20 minutes.

I have some pages that I do not want to expire until the user actually
leaves the site. Some of our clients keep the page up all day and I want 
the session to remain active. So, what I did was put a <META> tag in the 
page to refresh the page so it won't expire. Here's the tag.

<META HTTP-EQUIV="refresh" CONTENT="<%=(clng(session.Timeout)-2)*60%>">

You can change the time-out value by putting Session.Timeout=xx in your 
ASP page.



© 1999-2004 Synop Pty Ltd