Re:Pastejacking
by Unklejoe on Monday May 23, 2016 @08:38PM
(#11758109)
On a somewhat related note: why do browsers allow websites to prevent you from leaving via those annoying dialog boxes that ask you to click "cancel" or "leave"?
[ Parent
| on HN ]
To be able to remind you about your unsaved changes before you leave the page. I personally find the benefits of websites doing that to be greater than the annoyment from websites abusing this functionality. (just an extra click when its being abused, but potentially saving hours of my time when used properly)
Re:Pastejacking
by sethammons on Monday May 23, 2016 @09:34PM
(#11758379)
Sure, but I ant to at least be able to blacklist sites. Yes, Jira, I'm looking at you.
This seems like a good thing for an extension to do.
I have seen sites that have pages where you're placed in a queue (for whatever reason) and if you leave the page you will be dropped from the queue, so it's nice to have something preventing you from accidentally leaving, but that's the only legitimate use I can think of.
I used to work for a company whose primary product was a web server that companies could buy and run for use purely internally. Our pages involved a lot of data entry that could be lost, so that sort of pop-up can be handy in that situation as well.
Of course a better solution wouldve been a program which doesnt so easily let you lose data in the first place, but this software was long past that.
Still, that functionality should be opt-in.
It's really not that bad. The big problem was historically the buttons were labeled "Cancel" or "Ok", and some browsers allowed pages to customize the button labels, making which you clicked very ambiguous. Browsers today just giving "Stay on this page" and "Leave this page" buttons aren't really much of a bother if you remember how bad it used to be.
Or potentially losing any page state when navigating away or closing a browser, such as form data.
Re:Pastejacking
by Turing_Machine on Monday May 23, 2016 @09:49PM
(#11758439)
Right. You don't want to lose the blog post or other document you've been working on for an hour because you hit the close button on the wrong tab.
Re:Pastejacking
by atishay811 on Monday May 23, 2016 @09:34PM
(#11758380)
Websites can find better solutions if we kill this annoying feature. We have local storage in all browsers. Rather than prompting why not save it and recover when the user comes back. The users will always prefer this. It saves data even when the website crashes or the connectivity is lost and there is some important data on the page. Why have a feature that is abused more often than used especially there is no case where it is the only/best solution.
It's not always that clear. If I leave a page, how is one to know whether that was intentional or not?
If it's intentional, you don't want to pull the data back up (people want a "fresh copy")
If it's not intentional, you do want to pull the data back up.
Though of course you can make something like a "New Copy" button, but then that presents its own challenges.
That no longer makes sense unless it isn't feasible to preserve the change history along with current state...
I agree. This thought process comes from a different era and has just continued to perpetuate itself. If you are working on insanely* large files then that box makes sense, otherwise we have the technology to save the user the headache.
*insanely large is anything that takes up 75% of whatever computer bottlenecks first at the time of reading this comment(Memory, processor)
Funnily enough that API is already highly restricted: You can only show that single dialog box, you cannot modify the actions of the cancel and leave buttons and you cannot perform any asynchronous operations within the callback. (Technically you can, but the browser won't wait for them to finish)
All this was introduced to prevent abuse. Apparently it still wasn't enough though...
Re:Pastejacking
by moron4hire on Monday May 23, 2016 @10:34PM
(#11758625)
It's important to point out that the "yes, actually leave" option is not overridable. As a developer, you only get to set what message is displayed. The browser handles the rest, and it's basically "stop redirecting or continue". The developer only has control in the "stop redirecting" case.
Totally agree. On Firefox these are often modal to the whole browser so you can't even force close the tab.
What absolutely annoys me about this feature is that there are shitty ads which throw this dialog in a loop, making it virtually impossible to close them.
In which browser? Modern implementations shouldn't even make that possible.
Chromium on Linux. Maybe they play some tricks with refreshing or redirecting to make the browser show this dialog again on the next attempt to close the tab, if the browser wouldn't normally do that. Unfortunately, I didn't investigate and don't have links.
I see it on Firefox. Now that you mention it, it seems to happen less often lately. Maybe I am looking less at shady sites or they have changed something.
Re:Pastejacking
by stephentmcm on Monday May 23, 2016 @08:57PM
(#11758209)
It's intended use is for data entry, it's meant to be a prompt for "Hey there's unsaved changes on your 'Super Important Document' are you sure you want to to leave?"