0

Can something be done to prevent a user from using the back button when wp_logout_url is called? Sure, it logs the user out but they can still see pre-rendered HTML on the page if they press back. Being sensitive data, what can be done?

I have come up with a variety of workarounds that don't answer it, from trying to close the window to redirecting to a different url etc.

Does anyone know how I can prevent a user from pressing BACK, or an elegant hack to stop this?

I need something that checks if the user is logged in, similar to how if you logout in facebook, you can't click back

SMacFadyen
  • 3,145
  • 2
  • 25
  • 37
  • 2
    You are trying to break the way HTTP has worked for decades? – Greg Sep 19 '12 at 09:11
  • @Greg I don't want to prevent the back button personally `Its a request`. I need something that checks if the user is logged in, similar to how if you logout in facebook, you can't click back. I was asking to drum up a discussion and think outside the box. – SMacFadyen Sep 19 '12 at 09:36
  • i don't see the point in doing this. if the user logs out and presses the back button, the script should know that he is not logged in and then redirect the user to the login page, and not display sensitive info. unless the code is badly written and doesn't behave that way – Vlad Balmos Sep 19 '12 at 11:06
  • @VladBalmos I think that answers your question: code is badly written? `It's Wordpress` – Greg Sep 19 '12 at 15:19
  • @Greg i was speaking in generally terms, not refering to wordpress. but fair enough – Vlad Balmos Sep 19 '12 at 15:24
  • Duplicates: http://stackoverflow.com/questions/7011334/disable-browser-back-button http://stackoverflow.com/questions/961188/disable-browsers-back-button http://stackoverflow.com/questions/87422/disabling-back-button-on-the-browser http://stackoverflow.com/questions/5673253/disable-browser-back-button and more... – Jocelyn Nov 20 '12 at 20:18

0 Answers0