Closed Bug 285836 Opened 19 years ago Closed 3 years ago

Make "Remove All Cookies Now" undoable

Categories

(Firefox :: Settings UI, defect)

defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: klassphere, Assigned: scottwu)

References

Details

(Keywords: dataloss)

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050309 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050309 Firefox/1.0+

"Clear Cookies Now" should be canceled when you select "Cancel" in the pref dialog.
In other words, the effect of clearing cookies shouldn't be finalized until the
"OK" button is pushed.

Reproducible: Always

Steps to Reproduce:
1. Push "Clear Cookies Now" and make it grayed out
2. Push "Cancel" in the pref dialog
Actual Results:  
All cookies are removed.

Expected Results:  
Cookies are restored / nothing happens
IIRC the "Cancel" button could actually restore changes in an older version,
though it might be for saved forms, so it may be a regression.
Version: unspecified → Trunk
Removal of a behaviour does not qualify as a regression.
Depends on: 210173
OS: Windows XP → All
Hardware: PC → All
bug 210173 is related in that it wants a way to prevent accidental deletions,
but not the same thing.

There is no cancel button on platforms other than Windows, preferences are
instant-apply there.
No longer depends on: 210173
OS: All → Windows XP
Hardware: All → PC
Flags: blocking-aviary1.1?
Flags: blocking-aviary1.1? → blocking-aviary1.1-
I've just managed to lose all my cookies by accidentally clicking the 'clear
cookies' button. Some kind of confirmation step would be very helpful here.
Now I have to remember all my logins for lots of websites :-(
Keywords: dataloss
I too have just lost all my cookies by accidentally clicking the "Clear" button on the Windows platform.  Not having a confirmation on this button is a huge oversight.  I would mark this as a critical issue.  A basic rule for software design is that any time data is to be lost, especially when unrecoverable,  you always always confirm with the user.
*** Bug 322117 has been marked as a duplicate of this bug. ***
Yeah, I just lost two years worth of cookies because I accidentally pressed the Clear Cookies Now button and clicking Cancel didn't undo it.  Not cool.

The severity of this bug definitely needs to be changed to critical.
(I wonder what is the use case for those "Delete Something Now" buttons in Options now that Firefox has the Sanitize feature. Perhaps they could be removed, along with the confusion they apparently cause?)
sorry for bugspam, long-overdue mass reassign of ancient QA contact bugs,
filter on "beltznerLovesGoats" to get rid of this mass change
QA Contact: mconnor → preferences
Assignee: bugs → nobody
Morphing this bug to be less specific about implementation: "provide a way to undo 'Remove All Cookies Now' action"? There's no cancel button in the current UI, which is a Cookies window with "Remove cookie", "Remove All Cookies Now", and "Close" buttons.

Summary: "Clear Cookies Now" should be canceled when you select "Cancel" in the pref dialog → Make "Remove All Cookies Now" undoable
<charliebrown> AUGH! </charliebrown>

One-click cookie annihilation with no way to opt out is simply A Bad Thing. My arm twitched just as I was clicking Remove Cookie (singular) and wiped out a few dozen persistent logins that I wanted to maintain.

Some of the possible options:
* standard OK/Cancel confirmation box upon clicking Remove All
* optional confirmation box if "Ask me before clearing private data" is checked
* Cancel button in the Cookie dialog window
etc.
Severity: normal → major
OS: Windows XP → All
Hardware: PC → All
As for designing this feature...would the following be an acceptable potential implementation?:

1. Pressing Remove All Cookies would first create a backup copy of cookies.sqlite
2. cookies.sqlite is emptied
3. The Remove All Cookies button changes its label to "Restore Deleted Cookies" so the operation can be undone.
4. Closing the dialog will delete the cookies.sqlite backup file.

That would give the user the opportunity to undo the action immediately after it occurs, without leaving a copy of the cookies file around, which I imagine some might consider an information leak security issue.

Feedback?
I support Scott Garman's suggestion.
While I support Scott Garman's comments, it seems overkill.   An 'This is going to remove all your cookies.  Are you sure?' message box would be a massive improvement.  I just lost all of my cookies.... I selected a cookie I wanted to delete and then accidentally hit the wrong button.   Not cool.   For such a simple fix, I'm amazed it's still not there after FIVE years!!!!
It would be really nice to have a confirmation dialog. This just happened to me too, I selected a site and accidentally clicked "Remove All".
Assignee: nobody → scwwu
Can you update the status _on_ the bug, please?
Flags: needinfo?(scwwu)
I got a working patch using a simple confirm dialog (nsIPromptService). I think it will be enough to prevent anyone from accidentally removing all cookies.
Flags: needinfo?(scwwu)
The number of cookies to be removed is shown when the search box is used (so we have filtered results).
Hello Stephen, this is Scott from Taipei, and I wonder if you could give me some UX/UI feedback on this ancient bug?

The issue is pretty straight forward: Some users feel that it's too easy to accidentally delete all cookies. I implemented a very simple confirm dialog to prevent that, and I'd like to know what you think. I've included screenshots of the dialog as attachments.

Thanks!
Flags: needinfo?(shorlander)
The problem here is two-fold.

We can place a confirmation prompt to show users when they hit the "Remove All" button, but it is not likely that users will understand what it means to lose all of their cookies until they have started browsing websites again.

We should stay away from adding confirmation dialogs, as they don't usually make the results clear and users may still blindly hit the OK button before they have realized what they did.

If we think Remove All is troublesome, we may be better off just removing the "Remove All" button itself. Do we have telemetry data to see how often that button is used? Scott, would you be interested in adding a telemetry probe for this if we don't have one?
Flags: needinfo?(shorlander) → needinfo?(scwwu)
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #22)

> We should stay away from adding confirmation dialogs, as they don't usually
> make the results clear and users may still blindly hit the OK button before
> they have realized what they did.

In general this is true. But in some cases, in particular with potential data loss, a confirmation might be warranted. This is similar to why we offer a confirmation for closing a window with tabs or if you have a download running.

The preferred way to do this would be to offer an undo for destructive actions, but that isn't always possible.

> We should stay away from adding confirmation dialogs, as they don't usually
> make the results clear and users may still blindly hit the OK button before
> they have realized what they did.

If we are worried about people understanding the implications we could be more verbose with our messaging. E.g. "You are about to delete all of your cookies, this could result in being signed out of websites, <more possible side effects>."

We should also be sure to allow people to opt out of seeing the confirm dialog.


> If we think Remove All is troublesome, we may be better off just removing
> the "Remove All" button itself. Do we have telemetry data to see how often
> that button is used? Scott, would you be interested in adding a telemetry
> probe for this if we don't have one?

Given how buried and advanced this pref is I would be very surprised if it had high usage. That doesn't necessarily mean it should be removed. But I would be curious to know what the proposed use cases are for it? 

We also have the Clear History dialog that does the same thing on variable time scales. Which also does not have a confirmation dialog. *but* does have an inline warning although oddly enough only if you select "Everything".
Hi Jared,

Thanks for your feedback. I agree that a lot of users may not understand the implication of removing cookies, or just blindly clicking ok without reading. On the other hand, I feel that this feature is more geared towards power users who dig into prefs. Initially this bug is about people who know what cookies are and probably want to delete individual cookies, but accidentally pressed the delete all and lost everything. If we remove the button altogether, the experience for power users may suffer.

It doesn't look like we are tracking its usage with telemetry. I've never done it but implementing it seems straight forward enough. I can get in touch with the data team if we want to track the usage.

I agree with Stephen that we can improve on the message to be specific about the side effects of deleting cookies, and that a don't-see-this-again option is another UX improvement we could take.
Flags: needinfo?(scwwu)
Thanks for the replies Stephen and Scott. Per Stephen's response, we probably won't get much value out of telemetry since its usage will be low but very useful to those who intend to use the feature.

Scott, do you want to move forward with implementing the confirmation dialog with a don't-see-this-again option?

Please use the following strings for the dialog:
----------------------------------------------------
| Removing all cookies can result in being signed  |
| out of websites along with other potential       |
| side effects.                                    |
|                                                  |
| [x] Warn me when I attempt to remove all cookies |
|                                                  |
|         [Remove All Cookies]  [Cancel]           |
----------------------------------------------------
Thanks Jared, I'll move forward with the dialog changes.

Marking this as Resolved > Worksforme since the issue no longer is reproducible on the latest versions of Firefox Nightly 95.0a1 (2021-10-18), beta 94.0b7 or release 93.0 on Windows 10 as the confirmation prompt is present when trying to clear cookies.
If anyone can still reproduce the issue either re-open it or file a new one.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: