Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Preventing to go to the previous screen by clicking on browser back button

 
Krish Yeruva
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How do I prevent a user from clicking the back button and going back to the previous screen once he "Sign Out" in HTML(Without disable the back button of the browser)?

I tried to do the same by writing the following code inside <head></head> tags in html.


<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="Cache-Control" content="no-store" />
<meta http-equiv="Cache-Control" content="no-cache" />

But it is not working in any browser. So please help out regarding the same.


Thanks in Advance



 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried the forum search?

It has been asked a bunch of times in the past.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic