Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2007

Tip: Looking for answers? Try searching our database.

Overcoming POSTDATA Warning

Thread view: 
Jack Daynes - 18 Jan 2007 05:36 GMT
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,
Signature

-- 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
==================================

Daniel Pitts - 18 Jan 2007 07:02 GMT
> I'm hoping that someone here can help us out. We are in
> the process of re-writing the underlying code for my
[quoted text clipped - 7 lines]
> 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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.