in reply to How to code security for Expires Page

Unfortunately not all browsers respect the expires directive, you might try the following to add the no cache pragma to the headers when you output the login page:

tachyon

# if using CGI.pm to generate output try: print $query->header( -type => 'text/html', -expires => '-1d', -Pragma => 'no-cache', -Cache-control => 'no-cache'); # if directly outputing try: print <<END_OF_HEADER; Status: 200 OK Expires: now Pragma: no-cache Cache-control: no-cache Content-type: text/html END_OF_HEADER

This should generate a page expired message when you try to go back.

Replies are listed 'Best First'.
Re: Re: How to code security for Expires Page
by Anonymous Monk on Jun 07, 2001 at 07:24 UTC
    I have try up the code u send but problem is it still loading the page when i press the back button. The page only expired when that particular page haven't finish 100% loaded and i press other link, then i press the back button the expired page then only will show. Else the page 100% finish loaded then click to another webpage link and i press back, the page didn't expires.