Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2007
    Posts
    24

    Exclamation Unanswered: How to do Logout action Perfect

    I write logout code and redirect page to login page by
    session resetting. But when I click on back of Internet explorer it shows me all page, if I refresh the page then only it shows session expire error.
    Is anybody know the solution?

  2. #2
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Sounds like caching of some sort, however the page you're going back to should check to see if the session is valid (or exists) and if not then redirect to login page. This will stop people from going back.

  3. #3
    Join Date
    Apr 2007
    Posts
    24
    If we click on back in IE it shows the page without checking session.

  4. #4
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Do the page you are going back to have session checking? If so, are you sure it works?

  5. #5
    Join Date
    Apr 2007
    Posts
    24
    Yes, if We click back button on IE and click on refresh then it shows session expire message. It works, but if you only click back - back - back IE shows all the screen which you browse before logout!

  6. #6
    Join Date
    Mar 2007
    Location
    636f6d7075746572
    Posts
    770
    Have you tried disabling the cache :

    <?php
    header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
    ?>

    Also what is your PHP to check the session and what do you do if the session has expired?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •