Possible Duplicate:
Disable browser's back button
Prevent user from going back to the previous secured page after logout
I am developing an online course registration portal in which after successfully login the user redirects to his home page. In his home page there is a hyperlink for logout which when the user clicks directs to a servlet which invalidate the session and redirects to the portal home page. In the portal home page i am using the following script in the head section of the html code:
<script>
window.history.forward(1);
</script>
In the body section of the html code I am using this.
<body onunload="javascript:history.go(1)">
But the problem is that still the back button redirects me to the user home page after logout. But after that when I click the back button it remains on the user home page. But i want to restrict it to the portal home page.