News for hackers. Stuff that matters.
Re:Ask HN: Why do browsers still support pop up dialogs and ... by enraged_camel on Saturday May 21, 2016 @02:10PM (#11745561)
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.
Re:Ask HN: Why do browsers still support pop up dialogs and ... by sametmax on Saturday May 21, 2016 @02:23PM (#11745606)
If 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.

Re:Ask HN: Why do browsers still support pop up dialogs and ... by dredmorbius on Saturday May 21, 2016 @11:59PM (#11747326)
Such as HN on comment submission.
Re:Ask HN: Why do browsers still support pop up dialogs and ... by sametmax on Sunday May 22, 2016 @05:29PM (#11750365)
Comments 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.
Re:Ask HN: Why do browsers still support pop up dialogs and ... by dredmorbius on Sunday May 22, 2016 @07:54PM (#11750853)
Solving 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.

Re:Ask HN: Why do browsers still support pop up dialogs and ... by addicted on Saturday May 21, 2016 @02:24PM (#11745612)
But 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.

Re:Ask HN: Why do browsers still support pop up dialogs and ... by rhizome on Saturday May 21, 2016 @04:59PM (#11746162)
That is an indicator of a seriously outdated form implementation.