Sunday, October 22, 2006

No Way Back!

i found an interesting way to block user from "back" in IE & Firefox.

http://answers.google.com/answers/threadview?id=574062

the idea is to auto forward (which counter the back effect) for every pages.

dunno why, the provided solution don't work in firefox. after some tries and errors, finally i found a combination to disable "back" in Firefox.

<html><head> <title> Foobar: Home </title>
<script> history.forward(); </script>
</head>
<body onunload="history.go(1);"> <h2> Home, Sweet Home </h2> <p>
<a href="foo.html"> foo! </a> </p> <p> <a href="bar.html"> bar! </a> </p>
</body></html>

the bold parts are the key parts to make it happen.

Labels:

0 Comments:

Post a Comment

<< Home