Which data should not be saved if window is incognito

My addon is saving data associated with webpages to the storage:

  • text from that page
  • URL
  • page’s title

These data are necessary for restoring highlights the user made.

If the current window is in incognito mode a notification is being shown saying that being in private browser mode the addon can’t save private data (like URLs of visited pages).

I was wondering if this is the expected addon behavior or if I’m stricter than necessary?

The reason I’m asking is that I would rather not force the user to leave private mode for being able to store her/his changes, because it brings a bigger disadvantage (being not incognito) than advantage.
Would it be enough to notify the user that the addon is about to store private data (like URL of the corresp. page) - despite being incognito?

In my opinion, it’s a good idea to give the user an option. For example, create a settings page with something like this (following the style of website permissions):

Saving from Incognito/Private tab: ___ Always Ask ___ Allow ___ Block
Data saved by this extension is not encrypted and could be read by someone with access to this computer. (assuming that is true)
Data saved by this extension is stored locally only, not shared via Sync. (assuming that is true)

And then observe that preference when saving. (Block is the current behavior, but perhaps Always Ask is a better default?)


Hmm, IndexedDB is not available in Firefox Private windows, so that’s a different issue…

1 Like

Hi jscher2000,
thank you for your answer.
That is exactly how I would like to do it - if this is fine with AMO.

Sure. It is not like it is generally forbidden to save data from private browsing. Firefox does it as well.
What is important is to only do it when the user explicitly requests it (e.g. saving downloaded files or setting bookmarks).
But you must not save private browsing data automatically (e.g. history or cache from just viewing a page). I am not sure if an opt-in to automatic saving is acceptable.
If the action that makes your add-on save stuff is text selection on a page, I’d say that falls in the automatic category.

1 Like

Currently the default setting for saving is automatic, but the user can opt-out and save manually.
I would make it the default setting to not save in private browsing mode - with an opt-in for allowing to also save incognito.
So, in case the user did not opt-out from automatic saving but opts-in for saving in private browsing mode, would that be still fine?

Edit: It’s not the selection of text but using hotkeys or context menu to highlight the selected text. This will be saved automatically if the user did not chose to save manually.

I would see it like this: Setting a bookmark (persisting data) (even in private browsing) works by pressing Ctrl+D (explicit action) and gives you a popup with a remove button (notification and easy revert).

So if you do it like this (which by your description I think you do), you don’t even need an opt-in pref.
(But do add a notification like saved stuff, click to remove if you don’t have one yet.)

1 Like

Yes, I do it quite similar:
If something has been saved I show a notification that it has been saved (unless the user deactivated notifications in the settings).
There is no undo-button, but the user has easy access to saved data and can delete them anytime.
Thank’s a lot for your help, I have much more clarity now :slight_smile: