Disable back feature

K

Kevin Schultz

I have a website that contains a password protected page, however when the
user navigates away from the page, the back button can be used to go back to
that page without prompting for the password again. How can I prevent that?
 
K

Kevin Schultz

Thanks for the response. How do I kill the session variable?

Thanks again,
Kevin
 
P

p c

Guns can kill. How do you authenticate on the pwd protected page? Is it
authentication for that one page or for use on several pages on the site?
 
K

Kevin Schultz

I autenticate with a username and password only and I am only protecting
several pages versus the whole site. The directory housing the pages is
protected through cpanel. Someone suggested inserting,

<META HTTP-EQUIV="Pragma" CONTENT="no-cache">

before the head tag, but that has not worked.

Thanks,
Kevin
 
P

p c

The no-cache does not always work. For preventing caching, if the page
is ASP (or make it ASP), add the following lines at the beginning of the
document.
<%@ Language = VBscript %>
<%
Response.Expires = 60
Response.Expiresabsolute = Now() - 1
Response.AddHeader "pragma","no-cache"
Response.AddHeader "cache-control","private"
Response.CacheControl = "no-cache"
%>

I am not familiar with cpanel. For folks with protected pages or site
areas (not intranets), the usual method is to prompt the user to a login
page to authenticate, then store the authicated key in a cookie or a
session varibable and then redirect to the reuested page. Then when a
user requests another protected page, the server/page checks whether the
user is authenticated looking for the key. If the answer is yes, it
serves the potected page, if not it reditrects back to the login page.
For example yahoo, uses cokies.

For your example, if the no-caching does not work, you can have the
authentication page immediatley redirect to a page that alwasy ridrects
to another page. eg. login page -->alwaysredirect.asp-->somepage.
If the user clicks the back icon at somepage it will bring back to
somepage again. Sopticates user can get aroudn this. But msot folks
don't know how.

...PC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top