• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3864
  • Last Modified:

Disabling Back Button in IE using JavaScript

How to disable back button in IE using Javascript ?
I tried with history.go(-1),history.back(0),history.forward(-1) which I found not working ?
So can anyone please give me an alternative method to solve my issue of disabling the back button of a page in IE....
0
balaji
Asked:
balaji
3 Solutions
 
EsopoCommented:
Hi,

There is something you can do on the server side with headers.
Did you try this link?
http://www.4guysfromrolla.com/webtech/111500-1.shtml
0
 
BatalfCommented:
Someone also uses

<body onload="history.forward()">

which prevents a user to go back to this page.
0
 
GwynforWebCommented:
Have your page myPage.html  accessed via a redirect page with this in the head

<script>
  document.location="myPage.html"
</script>

then in the body tag of myPage.html have

<body onunload="history.go(+1)">
    The html of the page
</body>
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
COBOLdinosaurCommented:
Int the page you don't want to go back to, instead of a normal link use a replace:

instead of:

<a href="yourpage.html">
use:

<a href="#" onclick="location.replace('yourpage.html')">

Cd&
0
 
COBOLdinosaurCommented:
Split Batalf, GywnforWeb and Cd&  IMHO

Cd&
0
 
balajiAuthor Commented:
Hai
I am still now getting with the control of the back button of the browser property.
Can anyone let me know the reason if it couldbe controlled or not??

Thanks
Balaji
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now