What started out as a simple exercise has gone crazy. All I wanted to do was to give my users a warning of impending session timouts and give them the opportunity to refresh the session. I tried using the <CF_SessionWatch> tag but it's a bit too simplistic - I used it to setup a JS call to set a timer for a few minutes less than the session timeout value, but if the user takes longer to respond (maybe they walked away from their PC) than the remaining session timeout, then when the user comes back and clicks on the "yea I want to keep working" option, the resulting attempt to touch a page in the app (to reset the session timeout) ends up causing the login page to come up (since by then the session vars have timed out), so now the user is real confused (because he has his original page, as well as a login page in the pop-up window).
So, I added a bit more JS so that when the warning pop-up comes up, it first sets a timer for about a minute less than the amount of remaining session var time, and if *that* timer fires, then I log the user off and force the opener page to go back to the home page, and do a window.close() to get rid of the pop-up window. Sounds fine, right? Here's my concern - what if the page that is executing takes longer to execute than the session timeout value? Our server is set for 1 hour max timeout, and some of the data loading screens can take longer than that to run, especially when the CF or SQL server is loaded. I don't want to have it whacked in the middle of it's work by the session timeout checker. So this leads to my initial question, which I've never thought about before even though I've been using session vars for years and years - what exactly constitutes "inactivity" in CF's perspective? What if a long running page doesn't touch any session vars for a period of time greater than the session var timeout? Is session "activity" defined by a request being active, or by the actual touching of a session-scoped var? Do I need to have potential long-running pages periodically touch a session var? I thought about moving the code for setting up the JS timers from the application.cfm file to orequestend.cfm, which wouldn't start up the timers until the page actually completes, but then that has a bunch of problems with respect to errors and <CFABORT>. Am I making this harder than I need to? thanks Reed ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:238735 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54