News for hackers. Stuff that matters.
Re:Don't allow popups during page unload by feross on Friday December 21, 2018 @11:41PM (#18738952)
One by one, the Chrome engineers continue to chip away at the techniques in The Annoying Site https://theannoyingsite.com (warning: open in a secondary browser).

Talk video here: https://www.youtube.com/watch?v=QFZ-pwErSl4

Source code here: https://theannoyingsite.com/index.js

Well done!

Re:Don't allow popups during page unload by quietbritishjim on Sunday December 23, 2018 @07:41AM (#18745769)
To repeat my comment from last time this came up: in Firefox, this site is almost entirely neutered (but still a bit annoying) if you turn on the option that forces all popups into tabs rather than new windows. It's especially easy to shut if you open the site in its own window in the first place or use tree style tabs (so you can easily close the tab and all its descendants). I find this behaviour nicer anyway, even for non-malicious popups. I believe there is no such capability in Chrome.

To change the setting: in about:config change browser.link.open_newwindow.restriction to 0. Source: https://support.mozilla.org/en-US/questions/1066799

Re:Don't allow popups during page unload by ytqaz on Sunday December 23, 2018 @07:57AM (#18745821)
The difference is that in Firefox you have to go to the arcane about:config page while Chrome will roll this out by default for all users.
Re:Don't allow popups during page unload by quietbritishjim on Sunday December 23, 2018 @11:02AM (#18746756)
I don't think that is a difference: for the feature my comment was about (popups in tabs), the chances of Firefox and Chrome rolling this out to all users by default (not in a config, arcane or otherwise) seems roughly equal to me. That is: neither currently shows any indication, and I can't imagine why!

I case I was unclear, the setting I'm talking about is totally different from the bug report linked by OP. For that: I have never seen a popup appear when closing a tab in Firefox so I suspect it was already fixed long before Chrome (and I haven't changed anything related to that in about: config)! But I haven't been about to find any definitive source about it.

Re:Don't allow popups during page unload by amelius on Sunday December 23, 2018 @08:59AM (#18746093)
The real difference is that Chrome actually breaks sites that legitimately use this behavior (hypothetically).
Re:Don't allow popups during page unload by otterley on Sunday December 23, 2018 @12:42PM (#18747292)
Can you give an example of a legitimate use case?
Re:Don't allow popups during page unload by andrei_says_ on Sunday December 23, 2018 @01:15PM (#18747450)
Accidentally leaving a form in progress?

I believe closing gmail browser window while composing a message would show a popup.

I use it in an app where editing an item locks it for everyone else and to unlock it, one needs to save or cancel the edit. So closing the browser tab while editing shows a warning.

Edit: I was corrected by the comment below. Had in mind a different function.

Re:Don't allow popups during page unload by strictnein on Sunday December 23, 2018 @01:37PM (#18747565)
That's not the window.open() call, which doesn't stop the browser window from closing. It's (I believe) a window.confirm call: https://developer.mozilla.org/en-US/docs/Web/API/Window/conf...
Re:Don't allow popups during page unload by sbr464 on Sunday December 23, 2018 @01:09PM (#18747412)
I like the change, trying to dig, maybe:

A kiosk at a gov/hospital that needs a browser open on a default page?

Their are probably better sys admin/mgmt tools available though.

Re:Don't allow popups during page unload by SmellyGeekBoy on Sunday December 23, 2018 @09:21AM (#18746191)
Configuring things is arcane now? When did users become so helpless?
Re:Don't allow popups during page unload by skymt on Sunday December 23, 2018 @12:24PM (#18747174)
Yes, a giant table filled with hundreds of rows like "network.auth.subresource-img-cross-origin-http-auth-allow default boolean false" is in fact arcane.
Re:Don't allow popups during page unload by userbinator on Sunday December 23, 2018 @01:53PM (#18747648)
I've always thought it weird that Firefox's about:config UI is not much better than editing a flat configuration file. Clearly there wasn't much effort put into it. Even IE's configuration is far better organised than that, grouping everything into hierarchical categories.
Re:Don't allow popups during page unload by mintplant on Sunday December 23, 2018 @02:16PM (#18747778)
Uhh, Firefox does have the a proper GUI settings area. about:config is for experiments, internal flags automatically set according to the user's system configuration, or niche features not useful to most users (and so not promoted to a spot on one of the graphical panels).

With the "user.js" feature [0], you can actually control them from a flat configuration file.

[0] http://kb.mozillazine.org/User.js_file

Re:Don't allow popups during page unload by TomMarius on Sunday December 23, 2018 @09:31AM (#18746242)
If I tell my grandmother to open about:config she probably will write me off her will
Re:Don't allow popups during page unload by hopler on Sunday December 23, 2018 @10:09AM (#18746456)
My grandmother is pretty good with navigating text; constantly changing animated UIs are what confuse her.
Re:Don't allow popups during page unload by michaelmrose on Sunday December 23, 2018 @03:10PM (#18748041)
Everyones hypothetical grandma is a shitty proxy for all users.
Re:Don't allow popups during page unload by TomMarius on Sunday December 23, 2018 @04:11PM (#18748347)
I taught retired people how to use computers for 5 years, I met and saw around 100 retirees interacting with a computer and talked with them about it. It's a very good proxy. You could see it immediately - they can handle good UX with good defaults, but a computer literally scares them and definitely NOT just lightly, I had people that nearly started crying when they thought they broke it - and the failure was that wallpaper was black but they expected a picture; I saw people literally screaming because a popup window or a dialog opened and they (in case of error) thought the computer is broken forever - I wish you saw their surprise when I clicked OK. Teaching them what is a button took at least 3 lessons - and that was in Windows 2000 to Windows XP times when a button actually looked like a button.

They are seriously afraid to even use it normally. Expecting them to change configuration is utter bullshit.

Re:Don't allow popups during page unload by michaelmrose on Monday December 24, 2018 @03:36PM (#18754145)
For any given product there is an expected demographic and a reasonable projected demographic going forward.

Older people are not a special case of a class of people incapable of becoming proficient with technology.

Current older people are in the position of having grown up before computers.

For any given tech product the computer incapable are probably not your biggest segment and that segment will shrink over time.

All of our 80 year old grandparents who mostly don't use technology now will use even less in whatever afterlife awaits and pretty soon we will have 50 year olds who encountered computers in their teens and grew comfortable with them.

Re:Don't allow popups during page unload by TomMarius on Monday December 24, 2018 @06:54PM (#18754963)
Actually we have a rapidly increasing number of teens that have no idea how to use a computer due to smartphones and it's normal in Asia (especially Japan) to not even own a computer as a household. I've seen teens who don't know what a folder is.
Re:Don't allow popups during page unload by sideshowb on Sunday December 23, 2018 @10:44AM (#18746655)
Configuring things is a repeated cost we needn't pay if the defaults were good in the first place
Re:Don't allow popups during page unload by userbinator on Sunday December 23, 2018 @01:54PM (#18747653)
Not everyone wants the same configuration, which is the whole reason for its existence in the first place.
Re:Don't allow popups during page unload by TomMarius on Sunday December 23, 2018 @01:58PM (#18747681)
That doesn't change anything about what GP said though.
Re:Don't allow popups during page unload by hutzlibu on Sunday December 23, 2018 @12:19PM (#18747153)
When suddenly everybody went to the internet and not just experts.

Seriously, people can configure things. But on their level. So a ordinary person is able to configure popups yes no and might understand the consequences - but if this setting is next to experimental new webgl module which might crash your browswr - and hundreds of other very technical ones, then clearly no. And firefox about config is lile that.

Re:Don't allow popups during page unload by Franciscouzo on Sunday December 23, 2018 @09:29AM (#18746235)
Eternal September?
Re:Don't allow popups during page unload by ninkendo on Sunday December 23, 2018 @12:26PM (#18747188)
What does being helpless have to do with anything?

If a behavior makes sense and no one would reasonably not want it (like blocking popups during page unload), why does it need to be an option? Why isn't it just "the way the browser works"? What other "unbreak my browser" options are buried under there?

Re:Don't allow popups during page unload by michaelmrose on Sunday December 23, 2018 @03:08PM (#18748031)
Nobody has actually mentioned a way to block pop-ups on unload with about:config in the first place. Not having ever seen a popup on unload it may actually already work like this.

The option discussed was forcing new windows into tabs.

Re:Don't allow popups during page unload by userbinator on Sunday December 23, 2018 @01:48PM (#18747629)
The Annoying Site doesn't do anything if viewed without JavaScript --- showing that JS is responsible for the majority of annoyances. Unfortunately a lot of users are reluctant to use whitelist-based JS enabling, but IMHO it is extremely effective and well suited to those who mainly use the Internet as a hyperlinked document library.

(I discovered the effects of turning off JS a long time ago, and have been whitelisting since. It makes using the Internet much less irritating.)

Re:Don't allow popups during page unload by hopler on Sunday December 23, 2018 @10:07AM (#18746445)
Link for the readers with deja Vu about this comment:

https://news.ycombinator.com/item?id=18715008

Re:Don't allow popups during page unload by ronilan on Sunday December 23, 2018 @11:03AM (#18746770)
Feross has done a great job with the annoying site, providing a blueprint to work from (or against).
Re:Don't allow popups during page unload by mschuster91 on Sunday December 23, 2018 @06:29AM (#18745551)

     One by one, the Chrome engineers continue to chip away at the techniques in The Annoying Site https://theannoyingsite.com (warning: open in a secondary browser).

Darn, this thing is nasty. And I'm surprised that all the huge sites in https://theannoyingsite.com/index.js L107 ff have XSRF/replay protection in their logout URLs...
Re:Don't allow popups during page unload by stevewodil on Sunday December 23, 2018 @12:23PM (#18747170)
Why did I click that? Lesson learned wow.
Re:Don't allow popups during page unload by jraph on Sunday December 23, 2018 @07:43AM (#18745779)
Re:Don't allow popups during page unload by scarejunba on Sunday December 23, 2018 @03:35PM (#18748159)
Fascinating. Chrome on an iPad killed all the annoyances a few milliseconds after they started and redirected to a harmless page with a picture of a cat (like the original but without anything interactive).
Re:Don't allow popups during page unload by dtx1 on Sunday December 23, 2018 @07:22AM (#18745712)
the only way i got out was to

> killall firefox

that's pretty impressive

Re:Don't allow popups during page unload by semi-extrinsic on Sunday December 23, 2018 @12:41PM (#18747286)
Hmm, on Firefox mobile I opened in private tab, and then just clicked "close tab" after it started playing the annoying voice and that stuff.
Re:Don't allow popups during page unload by orbifold on Sunday December 23, 2018 @10:23AM (#18746548)
That sums up pretty nicely, why I don't use Firefox. On Safari it only managed to spam my history and download cat images periodically, but I could easily close the window and it didn't spawn any additional windows.
Re:Don't allow popups during page unload by sharken on Sunday December 23, 2018 @06:31AM (#18745561)
Some very annoying features there, logging you out of all major websites and taking over a referrer window.

It seems like a good candidate for the new Windows Sandbox feature in Windows 10 (https://techcommunity.microsoft.com/t5/Windows-Kernel-Intern...).

Re:Don't allow popups during page unload by Exuma on Sunday December 23, 2018 @02:35PM (#18747860)
Isn't this very useful though... like you're about to close a page without saving changes?
Re:Don't allow popups during page unload by bseidensticker on Sunday December 23, 2018 @02:42PM (#18747900)
I don't think removes the ability to have an unload prompt (navigating away will not save your changes are you sure?), it just removes the ability for the page to spam you with a popup in its dying breath.
Re:Don't allow popups during page unload by cronix on Sunday December 23, 2018 @03:32PM (#18748146)
They can also do what facebook does and just save everything you enter into a text box via ajax, whether you end up actually submitting it or not. /s
Re:Don't allow popups during page unload by nerdbaggy on Sunday December 23, 2018 @01:38PM (#18747571)
Now they will just show the popup when your mouse leaves the page close to the exit button
Re:Don't allow popups during page unload by adamscybot on Sunday December 23, 2018 @01:43PM (#18747600)
They could realistically prevent calls to open popups in response to a mouseover event too. It really ought to only be allowed on “affirmative” interactions like a click. Of course, they can just make the close icon do something else.