Skip navigation
ayuso_15
Currently Being Moderated

Loging out a user

Apr 2, 2008 11:12 PM

Hi everyone, i have found in my application that when you click on the Logout button it will log you out but if you click on the back button of the browser instead of relocating you to the login.cfm, It will show you all the history in the browser.

Any ideas of how to get rid of this problem?

<cfif isDefined('URL.logout')>

<!--- Ends session --->
<CFLOCK SCOPE="Session" TYPE="Exclusive" TIMEOUT="10">
<CFSET StructClear(Session)>
</CFLOCK>

<!---Redirects to login--->
<CFLOCATION url="/mcl_sistema/login.cfm" addtoken="no">

<cfelse>

 
Replies
  • Currently Being Moderated
    Apr 3, 2008 5:52 AM   in reply to ayuso_15
    Don't cache your pages.
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2008 6:44 PM   in reply to Dan Bracuk
    it usually happens because user's browser caches the visited pages. this
    is default browser behaviour.
    you can prevent your pages from being cached by using appropriate meta
    tags and/or cfheader tags. google 'coldfusion prevent page caching' for
    more info.

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
     
    |
    Mark as:
  • Currently Being Moderated
    Apr 3, 2008 8:24 PM   in reply to ayuso_15
    quote:

    Originally posted by: ayuso_15
    Do you have any example? I just want this to happen when the user logs out.

    Thanks

    In that case, the "don't cache the page" method won't work.

    If you want, you can let them do it. From a security standpoint, they were allowed to see those pages anyway. From a functional standpoint, put something in your application.cfc so that if they submit any forms or select any links while they are not logged in, they get re-directed to your login page.
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points