• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

browser back button functanality

 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

In my application i need to restrict the back button once the user loggs in to the system.If pressing back back it is going to the login page again.
I placed the code like history.forward(); but it is not working properly.

Can you please suggest me any other solution for this?

Regards
Rajani Bhagavan
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.
 
Arun Christopher
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put this in your login page


<script language="JavaScript">
javascript:window.history.forward(1);
</script>
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have placed the same code in my login page but still im not able to restrict the back button.
Can you please suggest me any solution
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can not disable the back button.

Eric
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
s we cant but can't we restrict the back button functionality??
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64718
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in any way that doesn't introduce more problems than it causes. And as I pointed out, you shouldn't.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do not want the back button. Perform posts and look into the expires header.

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