Hi,

I want to know if there is a way to prevent users from manually typing in the URL and entering the page after they have already signed out?

I was able to make the back button disabled.

Let's say if they have already click logout and when they click back, it won't go anywhere, which is what I want.

But, if they manually type in the url address, it will take them to that page. What I want to do is after they logout and whenever they try to type the url, it should not take them to that page, but instead to the login page.
is this possible? if yes, how?

Thank you for your help.

Recommended Answers

All 2 Replies

it has to do with caching. your page is cached on the clients computer, that is why they are able to get the page. if your server-side is asp.net then you can control caching settings for both client and server side. but i cant say anything about php and jsp for that matter.

Cache control is done via headers in PHP as far as I know..

Found something in the PHP documentation:

<?PHP
header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Cache-Control: post-check=0, pre-check=0', false );
header( 'Pragma: no-cache' );

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.