how to make the page not available in perl when click Back button

D

Darick

when i try to click back button in some website, the website will show
the message in the following :-

---- start
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available.
As a security precaution, Internet Explorer does not automatically
resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh
button.
---- end

may i know how to do this effect in perl ?
 
E

Eric Bohlman

when i try to click back button in some website, the website will show
the message in the following :-

---- start
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available.
As a security precaution, Internet Explorer does not automatically
resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh
button.
---- end

may i know how to do this effect in perl ?

You don't. It's all client-side. Most browsers will complain if you try
to reload a page that was returned as the result of a form submission using
the POST method. That's because the relevant recommendations assert that
POST requests are not to be regarded as idempotent, which is to say that
the result of submitting multiple POST requests is, in general, quite
different from the result of submitting a single request.

The reference to "Internet Explorer" in the message you saw should really
clue you in that it came from the browser itself, not the server on the
other end.
 
W

Walter Roberson

:> when i try to click back button in some website, the website will show
:> the message in the following :-


:> Warning: Page has Expired The page you requested was created using

:> may i know how to do this effect in perl ?

:You don't. It's all client-side. Most browsers will complain if you try
:to reload a page that was returned as the result of a form submission using
:the POST method.

True, but it is also possible to cause this effect for non-form
pages, by sending an appropriate 'expires' header.
 
S

Sherm Pendley

Darick said:
the message in the following :-

---- start
Warning: Page has Expired
may i know how to do this effect in perl ?

An expiration date can be included in the HTTP response. LWP gives you
access to all the HTTP headers in the response it receives, so all you need
to do is look for an expiration date, and if one is included compare it
against the current date.

You didn't say what GUI toolkit you're using to write your browser, so I'm
afraid I can't help you display the warning dialog. Sorry!

sherm--
 
D

Darick

:> when i try to click back button in some website, the website will show
:> the message in the following :-


:> Warning: Page has Expired The page you requested was created using

:> may i know how to do this effect in perl ?

:You don't. It's all client-side. Most browsers will complain if you try
:to reload a page that was returned as the result of a form submission using
:the POST method.

True, but it is also possible to cause this effect for non-form
pages, by sending an appropriate 'expires' header.

may i know how to send an 'expires' header ? could u show me ?
 
W

Walter Roberson

:may i know how to send an 'expires' header ? could u show me ?

http://vancouver-webpages.com/proxy.html

"RFC1945 (the HTTP1.0 spec.) says that if the Expires date is equal
to or earlier than the value of the Date header, the recipient must
not cache the document. A value of zero (0) or an invalid date
format should be considered equivalent to an "expires immediately."

http://www.oreilly.com/openbook/webclient/ch05.html

$r->header($field [=> $val],...)

When called with just an HTTP header as a parameter, this
method returns the current value for the header. For
example, $myobject->('content-type') would return the value
for the object's Content-type header. To define a new
header value, invoke header( ) with an associative array of
header => value pairs, where value is a scalar or reference
to an array. For example, to define the Content-type
header, one would do this:

$r->header('content-type' => 'text/plain')
 
K

krakle

Darick said:
when i try to click back button in some website, the website will show
the message in the following :-

---- start
Warning: Page has Expired The page you requested was created using
information you submitted in a form. This page is no longer available.
As a security precaution, Internet Explorer does not automatically
resubmit your information for you.

To resubmit your information and view this Web page, click the Refresh
button.
---- end

may i know how to do this effect in perl ?

This isn't a Perl question. Nor is it relevant to this newsgroup. So
be prepared for 25 more people to tell you the same over and over...
and over again.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,008
Latest member
HaroldDark

Latest Threads

Top