SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Jan 2009
    Posts
    176
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to disable back button after logout?

    DON'T WANT TO DISABLE BACK BUTTON FUNCTIONALITY WHEN USER ALREADY LOGGED IN.
    i want my LOGGED IN user to use browser back button as normal. But once he choosed to log out, he is not allow to see any of his/others contents by pressing Back.
    how to do this?

    right now i have written this code.
    <BODY onload="history.go(+1)" >

    but by writing this, back button is not working even if user logged in.

    please help.

  2. #2
    SitePoint Enthusiast
    Join Date
    May 2009
    Location
    Latvia, Riga
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's not a good idea to disable back button.
    However:
    1. Maybe you should place onload event on body only when user is logged in?
    2. On logout button click open new window and close current window. Button will not work.

    Both points are stupid


Bookmarks

Posting Permissions

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