A client side only solution can not ensure that this problem will not occur.
A more robust solution is to use the "Synchronizer Token Pattern" from core
J2EE Patterns.

Here is an excerpt from
http://www.corej2eepatterns.com/Design/PresoDesign.htm:

" Synchronizer (or Déjà vu) Token

This strategy addresses the problem of duplicate form submissions. A
synchronizer token is set in a user's session and included with each form
returned to the client. When that form is submitted, the synchronizer token
in the form is compared to the synchronizer token in the session. The tokens
should match the first time the form is submitted. If the tokens do not
match, then the form submission may be disallowed and an error returned to
the user. Token mismatch may occur when the user submits a form, then clicks
the Back button in the browser and attempts to resubmit the same form.

On the other hand, if the two token values match, then we are confident that
the flow of control is exactly as expected. At this point, the token value
in the session is modified to a new value and the form submission is
accepted.

....
"

This combined with a client side JS solution will ensure the form is only
submitted once.

HTH,
Rich Kroll
Senior Software Engineer
NextWeb Media
 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304996
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to