Some ideas that might be useful.

1. Use POST but then do a redirect.

You post to a page that updates the state (say add something to the basket)
and then redirect to a page which display the new state (contents of the
basket).  This way the user can hit reload and it doesn't reapply the post.
This still doesn't solve the back problem, but is useful in some situations.

2. Use GET with a unique request id.

Each GET link contains a unique id that the server uses to identify repeats
requests.  For instance, your "add to basket" link is a get link which
contains this id.  The server adds the item to the basket and stores the
request id.  If the user calls the "add to basket" script again with the
same request id, you simply don't add the item and present the contents of
the basket or whatever you normally do after an item is added.  The next
time you present a page with an "add to basket" link you use a different
request id.

These are simple approaches, but are useful in some situations.

-topher
----
Unfortunately, GET is not appropriate all the time. In the case of a
shopping cart application, using get would cause the form to be re-executed
automatically, which defeats the purpose (see my original post). Somehow,
amazon is managing to do this successfully.
----

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