I am using the following code to log a user off if their session times out.
It works great but the person does not know if they have timed out until they go to another page or hit refresh.
Is there a way to go to , <cflocation url="../login.cfm">, as soon as the session times out(not waiting for them to refresh the page?
<cfset bLoggedIn = False>
<cfif IsDefined("Session.UserID"
>
<cfif Session.UserID neq "">
<cfset bLoggedIn = True>
</cfif>
</cfif>
<cfif bLoggedIn eq False>
<cflocation url="../login.cfm">
<cfexit>
</cfif>
It works great but the person does not know if they have timed out until they go to another page or hit refresh.
Is there a way to go to , <cflocation url="../login.cfm">, as soon as the session times out(not waiting for them to refresh the page?
<cfset bLoggedIn = False>
<cfif IsDefined("Session.UserID"
<cfif Session.UserID neq "">
<cfset bLoggedIn = True>
</cfif>
</cfif>
<cfif bLoggedIn eq False>
<cflocation url="../login.cfm">
<cfexit>
</cfif>