I don't see how any of the "excuses" in other people's comments would preclude something like that allowing people to easily escape an evil site like you describe.
Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
41–50 of 84 posts
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#42Pages rely on window.open() for all sorts of non-popup things. You can't just break window.open(), or sites like DDG will stop working. Not that there aren't ways to fix this, but in general "remove the offending API" rarely works on the Web. You need a more subtle approach.
I think OP is rather talking about window.{alert,prompt,confirm}, at least "ie, you can't interact with the page without answering the dialog" hints towards that
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#43> There are also sites that will kill your page history by going through a bunch of redirects to prevent you from leaving with the back button. It's 2016 and Microsoft is incapable of creating a reliable cross-site login system. Instead, we still have the disastrous mess that is live.com. Minimum 2 redirects - at least 1 of which is Javascript (seriously?) - to handle a simple login. And when your cookies go a bit wo…
Flying Spaghetti Monster help you if you have both a personal and an organizational (Office 365) Microsoft account with the same email address.
Input your email / password -> select if you want to use your personal or business profile -> enter your login info again (because, reasons) -> go through two redirects.
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#44Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#45The fact that people make bad things with features doesn’t mean these features are inherently bad. You’ll always have people abusing the technology. Pop up dialogs are used a lot for e.g. form validation.
Preventing the bad things may easily be more valuable to users than keeping/enabling the good things made possibly by that tech.
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#46Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#47I sometimes wonder how nice life would be if we had two modes in browsers: Mode 1: Render static content; allow unobtrusive JavaScript operations (perhaps capped by total operations or CPU usage). Mode 2: Run unlimited JS operations, allow alert() and window.onbeforeunload events handers. The second mode could be called "Application Mode" and could be turned on selectively per site. This would allow you to give gmail…
I just keep Javascript turned off except for sites I whitelist. Nobody ever believes how easy and unobtrusive this is, despite browsing a pretty huge and diverse set of domains. This has gotten a little more difficult since chrome changed the UI around these settings though.
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#48Earlier quoted context omitted.
The most common use for onwindowunload dialog boxes is to warn the user of unsaved changes and prevent their loss. Our web app autosaves so the dialog box should never appear, but our metrics show that it appears surprisingly often -- sometimes it can take a few seconds for changes to flush through the websocket, and for the save to get acknowledged. If you took that away, our users would lose changes. I imagine they…
If this is absolutely necessary, you can force the site to request permission to do this, just like getting location.
Yes, that's a lot of msgboxes, but it's a decent compromise I think. It's not like that would happen very often anyway.
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#49Earlier quoted context omitted.
>Depending on the design and the requirements of an application modal dialogues and in rare cases even disabling leaving via the back button absolutely make sense. Sorry, I disagree with you. On a typical non-web application, a modal dialog doesn't prevent me from accessing other applications. It doesn't prevent me from forcefully killing crapware either. The idea that web applications should be able to break user ex…
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 o…
Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?
#50Safari has actually changed behaviour so alert/prompt/confirm dialogs are not modal outside of the tab - you can switch to other tabs and I believe even close the window/tab. They've also been restyled to make it obvious they're a prompt from the website not from safari itself. Also, there are legitimate uses for this functionality, so as with many things I think the solution is not to remove the functionality, just…
> Safari has actually changed behaviour so alert/prompt/confirm dialogs are not modal outside of the tab - you can switch to other tabs and I believe even close the window/tab. Firefox does this too.