PDA

View Full Version : forward/back buttons broken with POST data


dank
03-21-2001, 03:37 PM
Just curious if anyone has found a solution to this situation:

When building pages based on submitted form elements with method=GET, you can easily move forward and back between pages as desired with the browser's buttons.[nbsp][nbsp]However, if submitting large amounts of form data, the GET method might truncate some of the necessary info in the URL -- not good.[nbsp][nbsp]Also rather sloppy looking, but not a big deal.

However, when using method=POST, IE doesn't seem to allow the forward/back buttons to operate (at least not without an error page and the need to refresh), and Netscape allows one or two forwards/backs before getting fed up.[nbsp][nbsp]Looking at the Netscape source code of a POST-derived page that loads fine:
This document resulted from a POST operation and has expired from the cache.[nbsp][nbsp]If you wish you can repost the form data to recreate the document by pressing the reload button.
I removed any explicitly expiring cache headers, but maybe there is something else that can be done in that respect to retain some form (no pun intended :) ) of functionality?

Dan

Rich
03-21-2001, 09:37 PM
Are you using PHP? I have seen the behavior you reported with ASP and PHP. However, Perl under CGI does not seem to exhibit this behavior.

I'm not sure why the behaviors are different. I have a couple of applications where I actually WANT this behavior under Perl/CGI but can't seem to produce it.

Rich

dank
03-21-2001, 11:19 PM
You guessed correct -- PHP.[nbsp][nbsp]Interesting observation about the differences between languages.[nbsp][nbsp]I can't think of any explanations for that...[nbsp][nbsp]I've tried a few different content/expiration headers -- just shots in the dark -- but those didn't have any effect one way or the other.

Dan