32 ms·
Disabling the back button can be very useful in certain scenarios. Sometimes you want to prevent users from shooting themselves in the foot, for example when su
by enraged_camel 10y ago
Disabling the back button can be very useful in certain scenarios. Sometimes you want to prevent users from shooting themselves in the foot, for example when submitting a credit card payment. Even though there are prominent "please do not use the back button!" warnings, a lot of users still do, resulting in double-charging. So clearly there are scenarios where the default behavior can be sub-optimal and you need to override it or disable it. Sure, the user may be confused/frustrated, but not as much as they would if they saw a double-charge on their credit card statement.
- sametmax 10y agoIf you don't use a one-time generated key for the paiement page, one that can't be reused, and a process queue, you are doing it wrong. This is a technical problem, your user should not have to bother about thinking if can reload the page of not, he/she should be able to murder the shit of the F5 boutons if he/she wants to.
- dredmorbius 10y agoSuch as HN on comment submission.
- sametmax 10y agoComments and charging for money don't have the same objectives at all. I can understand that a dev can decide to allow the rare situation for rare duplicate comment that you can easily delete because it saves work and is not a big deal. While with other's people money, you can't do that. It's all a question of balance.
- dredmorbius 10y agoSolving one solves the other. While I executed my QED here deliberately, I've left more than a few duplicate comments on laggy connections and/or bogged-down browser sessions. Other elements of HN's design and workflow make detecting this difficult. Rather than returning the user to the comment they'd just posted, or its parent, you're returned to the discussion root. Catching typos, incorrect tags (I keep having to remember that _this_ doesn't emphasise content), etc., would be far easier if the renderd comment was presented. Solving this as a browser / HTML built-in would be most ideal. HTML though isn't stateful. By design.
- dredmorbius 10y agoSuch as HN on comment submission.
- addicted 10y agoBut why do you need to disable the back button? The issue in question (not resubmitting a credit card payment) could better be handled by the website telling the browser "Hey, this is a one time request". Hitting the back button then does not lead to that request being sent. I feel this is an issue where the heavy lifting should be done by website and browser devs, instead of breaking something the user expects.
- rhizome 10y agoThat is an indicator of a seriously outdated form implementation.