From:                   "LRMK" <[EMAIL PROTECTED]>
To:                     <[EMAIL PROTECTED]>
Subject:                How to get Page Has Expired message
Date sent:              Sat, 30 Nov 2002 23:52:09 +0600

> I want to make visitors see "page has expired" when they click the
> back button of browser how do I do it?

You need to add the 
        Cache-Control: no-cache
header to the CGI headers of the page to ask the browser not to cache 
it.

        use CGI;
        my $query = new CGI;
        print $query->header(-cache => 'no');

Whether the user gets the page has expired" message or the page gets 
downloaded again depends on whether you posted some data to it 
though.

To make it clearer let's make an example:

        Form.html contains
                <form action="FormHandler.pl" method="post">

        FromHandler.pl generates some output and the headers contain
                Cache-Control: no-cache

        The user clicks a link and gets to some other page

        Then he clicks the back button and get's the "page has expired".

If the Form.html contained
                <form action="FormHandler.pl" method="GET">
the data would be sent to the FormHandler.pl again and the user would 
get the response page again.

HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to