Clear Browser History |
| Sowjanya Reddy replied to Jobi K John at 08-May-08 12:28 |
First, set a cookie of any given name and value (as long as it's consistent) and carry it along in your application. On every screen, have a log-out button. When this log out button is pressed, it deletes or resets the value of the cookie to something that indicates logged out.
Now, on your sensitive info pages that you don't want backed into, have some JavaScript that basically checks the cookie to see if it's still there. This Javascript should be in the head or early part of your document. If the JavaScript detects that the cookie is gone or logged-out, then it uses a location.replace() with the URL of some "We're sorry, but you logged out" page.
In this case, if someone backed up to a sensitive post, the JavaScript would run, and the page would immediately be replaced by another webpage, and totally removed from the history |
|