Overcoming POSTDATA Warning

J

Jack Daynes

I'm hoping that someone here can help us out. We are in
the process of re-writing the underlying code for my
website (link to old version below). The site is (and
will continue to be) driven by PHP, javascript, and MySQL.

The problem I'd like to overcome is the browser's
navigation backwards through the tiers of screens and
menus. We have a "Back" link on the required pages, but
I would like to let the user navigate via the browser's
built in "Back" function, without getting the following
warning (from Netscape, in this case):

~~~~~~~~~~~~~~~~~~~~~~~~~~~
The page you are trying to view contains POSTDATA that
has expired from the cache. If you resend the data, any
action the form carried out (such as a search or online
purchase) will be repeated. To resend the data, click
OK. Otherwise, click Cancel.
~~~~~~~~~~~~~~~~~~~~~~~~~~~

There is no secure data, nor purchases involved. I
believe this is built into the browser, but I'm hoping
there is a way to bypass the warning without breaking
the function (creating an error) on the site. I believe
this is a javascript issue, but if I'm wrong, please
let me know and I will post to a PHP group.

TIA,
--
-- Jack --
==================================
The "Reply To:" information is
mangled with CAPS.
==================================
<http://shadetree-imaging.com/>
Wildlife Photography with
Emphasis on Birds
==================================
Poway, California (San Diego Co.)
N 32° 57' W 117° 04'
At 508' Elevation
==================================
 
D

Daniel Pitts

Jack said:
I'm hoping that someone here can help us out. We are in
the process of re-writing the underlying code for my
website (link to old version below). The site is (and
will continue to be) driven by PHP, javascript, and MySQL.

The problem I'd like to overcome is the browser's
navigation backwards through the tiers of screens and
menus. We have a "Back" link on the required pages, but
I would like to let the user navigate via the browser's
built in "Back" function, without getting the following
warning (from Netscape, in this case):
[snip]

This doesn't have much to do with either Java or JavaScript (which are
both very different). But, I will be glad to give you advice.
This message occures if you have any <form> elements with the attribute
method="post"

It may be possible to replace these with method="get".

The caveat is that generally forms submitted with "get" are expected to
NEVER alter anything (databases, files, etc...), where forms submitted
with "post" are expected to modify something, or contain data that
shouldn't appear in the URL.

There is nothing you can do in JavaScript (and even less you could do
in Java) to stop this. Its simply changing your HTML to use "get", and
your PHP to look in the post data instead of get data.

In the future, if you do feel the need to cross-post to multiple
groups, try to find relevant groups (none of the ones you selected
were), and also set a Followup-to header to just one group.

Hope this helps,
Daniel.
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top