Re: Problems when user hit back
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 34482
interpreted = N
texte = >The only way to safely deal with it is to design your site so that the>user never wants to use the Back button. ;~( The issue is that when the>user goes back, the browser resubmits the command to add the last line>item.>>If you can guarantee that there will never be more than one line with>a given SKU, you can write a small loop to check for duplicates and>forbid the subsequent adds. This really only works well if you are>using contexts to add to the cart, instead of commands.I deal with it by adding a rn=[random] to all of my links. On the shopping cart page I set a header to the rn value the first time through. Then on subsequent hits to that page I check to see if rn equals my header value if so then the user either hit reload or back so I don't add the item to the cart again. For every hit to the cart page that has a unique rn value I set my header to that value to check on the next hit.-- Sam LewisSamLewis.comTel: 626-852-0956 Fax: 916-404-5698-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list
.To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Associated Messages, from the most recent to the oldest:
>The only way to safely deal with it is to design your site so that the>user never wants to use the Back button. ;~( The issue is that when the>user goes back, the browser resubmits the command to add the last line>item.>>If you can guarantee that there will never be more than one line with>a given SKU, you can write a small loop to check for duplicates and>forbid the subsequent adds. This really only works well if you are>using contexts to add to the cart, instead of commands.I deal with it by adding a rn=[random] to all of my links. On the shopping cart page I set a header to the rn value the first time through. Then on subsequent hits to that page I check to see if rn equals my header value if so then the user either hit reload or back so I don't add the item to the cart again. For every hit to the cart page that has a unique rn value I set my header to that value to check on the next hit.-- Sam LewisSamLewis.comTel: 626-852-0956 Fax: 916-404-5698-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/
Sam Lewis
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Search design (1997)
Multiple Sendmail Tags on One Page (2008)
[WebDNA] Override price in Wd8.5 (2017)
two unique banners on one page (1997)
World Address Info (2003)
New Weird Behavior (bug report) (2000)
Follow-Up to: Removing [showif] makes a big difference in speed (1997)
include (1998)
Linux -> OS X (2002)
emailer prob (1998)
IP Address Ranges in a Database. (2003)
New servers and new inline cache (1997)
NewCart+Search with one click ? (1997)
ThreadMem ignored? (1998)
Converting order file to database (1998)
Document Contains No Data! (1997)
rename a file (1997)
I give up!! (1997)
How nuch ram??? (1997)
EMERGENCY: WebCatalog stopped processing .HTML (IIS) (2003)