The original "problem" was that the user set a quantity and did a POST. The
user-visible result of the POST was evidently to redisplay the same page.
Then the user changed a quantity and instead of hitting the submit button
again, hit the back button. After going through the awkward but irrelevant
IE refresh dialog, the previous page was displayed with the previously
entered quantity. Why is this a surprise? That's what the back button does.
It's a user error.

Bob Foster
Symantec Internet Tools  http://www.visualcafe.com/


______________________________ Reply Separator _________________________________
Subject: Re: POST and browser behavior
Author:  Taggart Gorman <[EMAIL PROTECTED]> at Internet
Date:    6/10/99 11:57 AM


As far as I can tell, this is a "design decision" on Microsoft's part.  My
guess is that they felt that POSTing a form is usually done for some sort of
submission of data, for security reasons, you shouldn't be able cache the
results of a POST.  (For example, you're on a public terminal, and you POST
an order at Amazon, and it then displays your address.  You leave the
terminal, and the next person to use the terminal could use the browser's
'Back' function to see the results of your POST, which maybe contains your
address, account number or whatever.)  But this is just a guess on my part.

The only way I've found to get around this is not to use POST.  Not really
much of a solution.  I've tried messing with the HTML headers, but it
appears that IE ignores whatever you send.

I've found that I don't need to use POST that often.  Submitting search
parameters, for example, work fine as GET.
And since you can't cache the result of a POST, you can't really put
anything worthwhile on the page that results from a POST.  I usually just
put a "Success!" type of page, maybe with an ID.

In the orignal message, Glen was looking to have behavior similar to Amazon.
I was thinking that Amazon used GET when you add something to your cart, but
it seems they dont.  But the page that results from the POST doesn't expire
in IE.  Wierd.

Anyways, my advice still stands - use GET if you can.

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Lastname Firstname
> Sent: Thursday, June 10, 1999 11:17 AM
> To: [EMAIL PROTECTED]
> Subject: Re: POST and browser behavior
>
>
> I would also be interested in an answer for this.  Internet Explorer (IE)
> 4.01 experiences the same problem when the "Back" button is pressed in a
> Shipment Tracking application.  If someone has a solution, definitely post
> it to the group as I assume many other Java Servlet-based applications
> experience this problem when working under IE.
>
> Thanks,
> Glen Hawkins
> Application Developer
> Skyway Systems, Inc.
>
>
>
>
>
> [EMAIL PROTECTED] on 06/10/99 10:27:21 AM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Glen C. Hawkins/Users/Skyway)
> Subject:  POST and browser behavior
>
>
>
>
> I'm working on a JSP shopping cart implementation, and am having a problem
> getting a desired behavior. Here's what happens with my shopping cart:
>
> -- my cart --
> (1) User is viewing the cart,
> (2) User changes the quantity of item(s) in the cart via a form
> (METHOD=post), and submits.
> (3) Quantity is updated.
> (4) User changes the quantity of item(s) again.
> (5) User hits back button.
> (6) With IE5, user gets message "Warning: Page has expired," and
> is invited
> to hit the refresh button.
> (7) User hits the refresh button, and their quantities are back
> at what the
> were at step (3).
>
> This is clearly not optimal! For an example of what I'm trying to
> accomplish, check out amazon.com:
>
> -- desired behavior (e.g., as at amazon.com) --
>
> (1-5) as above
> (6) No problem -- user is simply taken back to the previous screen
> (7) User clicks on "view cart" (or whatever) and the correct
> quantities are
> displayed.
>
> I've looked for a setting on HttpServletResponse, but to no avail. amazon
> doesn't seem to be using any META tags or special FORM tags that
> I can see.
>
> Help!
>
> Thanks,
>
> chris
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
> ==================================================================
> =========
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to