scorniglia
Technical User
Hi Everyone,
I added security to my web pages by using a login screen and setting session variables. I am not using cookies. Everything is working fine with one exception. I want the users to be able to use the back and forward buttons on the browser once they are logged into the site. After they logout however I do not want them to be able to get back in without logging in again. I added a logout button that goes to a goodbye page that contains the code:
<CFSCRIPT> StructClear(Session); </CFSCRIPT>
However the user can still press the back button and return to whatever page he was just on. I added the following code to my pages:
<CFHEADER NAME="Expires" VALUE="Tue, 01 Jan 1985 00:00:01 GMT">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="cache-control" VALUE="no-cache, no-store, must-revalidate">
When they hit the back button it comes to a system page that says nothing is cached, hit the refresh button, and when they do.....presto.... they are back in my site again.
How can I prevent rentry to the web site via the back button after logout while still allowing the back button to be used while the user is in the site? I noticed that this type of functionality is being used here on the Tek-Tips web site. How are they doing it? Thanks a lot for any help.
Regards,
Roy F.
I added security to my web pages by using a login screen and setting session variables. I am not using cookies. Everything is working fine with one exception. I want the users to be able to use the back and forward buttons on the browser once they are logged into the site. After they logout however I do not want them to be able to get back in without logging in again. I added a logout button that goes to a goodbye page that contains the code:
<CFSCRIPT> StructClear(Session); </CFSCRIPT>
However the user can still press the back button and return to whatever page he was just on. I added the following code to my pages:
<CFHEADER NAME="Expires" VALUE="Tue, 01 Jan 1985 00:00:01 GMT">
<CFHEADER NAME="Pragma" VALUE="no-cache">
<CFHEADER NAME="cache-control" VALUE="no-cache, no-store, must-revalidate">
When they hit the back button it comes to a system page that says nothing is cached, hit the refresh button, and when they do.....presto.... they are back in my site again.
How can I prevent rentry to the web site via the back button after logout while still allowing the back button to be used while the user is in the site? I noticed that this type of functionality is being used here on the Tek-Tips web site. How are they doing it? Thanks a lot for any help.
Regards,
Roy F.