Link to home
Start Free TrialLog in
Avatar of jduawa
jduawa

asked on

onSessionEnd and cflocation

is there a way for the onSessionEnd function of the Application.cfc file redirect the user to a different url when the session ends...i tried just using the <cflocation url="login.cfm"> tag but that ddidnt seem to work
thanks
ASKER CERTIFIED SOLUTION
Avatar of pigmentarts
pigmentarts
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jduawa
jduawa

ASKER

i was doing more googling and since onSessionEnd occurs asynchronously it cannot do a cflocation call
thats what i was saying above.  onSessionEnd occurs but its not until the next request to the server the broswer would know about it, at at points it too late.

why not use javascript to inform the users when the session is going to time out?
Avatar of jduawa

ASKER

that too is a possibility, it just would have bene more convenient to use the onsessionend.  I will award the pts for the effort
if i have not answered you're question then dont, i am sure someone can jump in and help.

i used a counter in javascript in the app file, every time the app.cfc is run (every page request) the counter is reset to 0, if the counter get to a set limited it informs the user the session is about to timeout and gives them a change to do something.

becuase app.cfc is done server side i dont think it will work how you want it.