aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes browser back button functanality Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "browser back button functanality" Watch "browser back button functanality" New topic
Author

browser back button functanality

rajanikanth bhagavan kanth
Ranch Hand

Joined: May 20, 2008
Posts: 78
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

Joined: Jan 10, 2002
Posts: 61417
    
  67

Please read this.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Arun Christopher
Greenhorn

Joined: Nov 18, 2008
Posts: 19
Put this in your login page


<script language="JavaScript">
javascript:window.history.forward(1);
</script>
rajanikanth bhagavan kanth
Ranch Hand

Joined: May 20, 2008
Posts: 78
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
You can not disable the back button.

Eric
rajanikanth bhagavan kanth
Ranch Hand

Joined: May 20, 2008
Posts: 78
s we cant but can't we restrict the back button functionality??
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61417
    
  67

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

Joined: Nov 08, 2001
Posts: 15376
    
    6
If you do not want the back button. Perform posts and look into the expires header.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: browser back button functanality