well i was not sure as i wanted to use asp as well so that when the 20mins ran out then a prompt box would appear asking to extend session.
the other problem i have is if i use javascript then how do i stop it refreshing the timer ever time a page is opened.. as i would like to use either asp or javascript on a password protected site and have the countdown on every page but at the moment if i did that it would keep on resetting?
The session expires 20mins AFTER the last page request, so if you refreshed the page, the timeout would reset itself back to 20mins, or whatever the timeout has been set to.
So in theory, having a JS timed on each page would simply need to start whenever a page reloads at whatever the time out is.
I hope i do understand fully what u are trying to achieve, but here is my advice.
A session by default, as dhtmlgod said is 20mins, you could increase it with this
Code:
session.timeout = 100
Better yet, the best way to track a users, session is by the use of cookies, with a
Code:
response.cookie
objects, setting the values of cookies to the users hard drive. Then whenever the user requests a page, check to see if the cookie exists and then create or extend the session based on that value
ALSO: You really cant monitor a session countdown with a javascript, 'cause it wont be effective, the session.timeout value is set by the server and the javascript client script woudl run, once the page loads on the browser, which would have different values
Bookmarks