When someone logs out of our site, I want the previous page to not be accessible (or any of the other pages.)
So far, when a user clicks the logout button on our site, I do the following:
1) I write to a file
2) erase the session cookie
3) disable the back button.
When each page loads on our site, it checks to make sure the login file has the correct variable, checks to see if the session cookie has a value. The session cookie is checked by javascript upon page loading, the login file is checked on the server.
Everything works but when someone hits the back button, there is enough of a delay where the page can still be viewed before the javascript redirects it.
Is there a better way to do this so that when someone clicks back, the information is no longer there at all?
Thanks!