Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1770 How can I disable the back button and prevent other users/hackers from viewing the private pages of the (site/contents) of a user who has logged out?

irt.org | Knowledge Base | JavaScript | History | Q1770 [ previous next ]

Q1770 How can I disable the back button and prevent other users/hackers from viewing the private pages of the (site/contents) of a user who has logged out?

On logout take the user to a dummy page before taking the user to the login page, then in the dummy page put the following script:

<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://my-company.com/login.htm">
</head>

<body>

<script language="javascript">
  window.history.go(1);
  window.location.href="login.html";
</script>

</body>

</html>

Submitted by Parsu


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.