Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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?

You are here: irt.org | FAQ | JavaScript | History | Q1770 [ previous next ]

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

©2018 Martin Webb