Live data from Hacker News

Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

news.ycombinator.com

1–10 of 84 posts

Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#1
There are still malware and advertising sites out there that allow browsers to use modal dialogs (ie, you can't interact with the page without answering the dialog). You can't even close the tab without getting rid of the dialog. 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. Why are these kinds of things allowed and supported by web browsers? Why do they even need the ability to have a pop up dialog with modern web sites being what they are?

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#2
Quite simply because browsers are not just used for websites but as an application platform as well. 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.

It might not amount to good UX practices but it's not malware or a dark pattern either.

Besides, if at all possible most browser vendors try to be backward compatible. There are many applications out there that make ample use of pop-up dialogues. There's no need to break those just because they don't provide a stellar UX.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#3
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.

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 improve the implementation.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#4
post #3

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. 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.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#5
Don't assume that those in charge of browsers need only appease users. Who makes browsers? Google, apple, microsoft... they have their own interests to worry about. Firefox is an oddball, but even they have interests beyond users.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#6
Vulnerabilities are patched frequently enough. If there is a kind of behavior you want to prevent, write a plugin for it. Noscript and Greasemonkey are pretty handy for most things.

The worst things a browser can do come from javascript, so having a whitelist is useful. Remove anyone from your whitelist that is engaging in behavior you disapprove of.

I don't let facebook run scripts on my machines because I disagree with their philosophy of selling user data to the highest bidder, and tracking everything users do. That's too intrusive so I simply disallow them access.

No site that calls in too many javascript packages is given any privs on my computer.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#7
post #3

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. 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.

http://i.imgur.com/WIeUFTN.png

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#8
It's not possible to prevent applications from creating modal dialogs and still allow them to be usefully interactive. If you took away `alert` and friends, sites would (and do) just create dialogs with HTML instead.

If you want websites to be able to be dynamic at all, then they can use that power to be annoying. Two sides of the same coin.

(the history thing seems like it might be more addressable)

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#9
> 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 wonky, you won't even be able to browser the MSDN site to look up technical details. You have to manually clear your cookies. Again.

Re: Ask HN: Why do browsers still support pop up dialogs and other bad behavior?

#10
post #8

It's not possible to prevent applications from creating modal dialogs and still allow them to be usefully interactive. If you took away `alert` and friends, sites would (and do) just create dialogs with HTML instead. If you want websites to be able to be dynamic at all, then they can use that power to be annoying. Two sides of the same coin. (the history thing seems like it might be more addressable)

Except my point is I'm completely okay with this because its not modal at an application level if its HTML. I just want to be able to leave the site. Change the way the page is rendered all you want, disable interactivity etc but I don't feel a website should be able to prevent me from closing it which is what a modal dialog does.
Post reply on HN