This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes clearing history and disabling back and forward buttons Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "clearing history and disabling back and forward buttons" Watch "clearing history and disabling back and forward buttons" New topic
Author

clearing history and disabling back and forward buttons

B Bhutta
Greenhorn

Joined: Jun 28, 2002
Posts: 14
Hi,
I want to disable the back and forward button. Currently the techinque I am using is on my html pages, I am using an onload method to call my clearHistory method which has the following code:
history.forward();
But this techinque, created a flicker when I press the back button. What I mean is, when I press back button, it goes to previous page and come back to same page.
Is there any better way to avoid this flickering!
Thanks for the help.
Thanks.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
no there is no way to do it.
look intolocation.replace instead of normal links, it covers up the last page in the history, but removing the back button pisses people off!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clearing history and disabling back and forward buttons
 
Similar Threads
How to refresh my page?
Back button of the browser
Questions of J2EE pattern and Struts
Maintaining sessions
controlling the browser's back & forward buttons