Closed Bug 1399563 Opened 7 years ago Closed 7 years ago

WebExtension local storage implementation different from Chrome's implementation

Categories

(WebExtensions :: Compatibility, defect)

56 Branch
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1313401

People

(Reporter: francoyy, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8

Steps to reproduce:

In Chrome, the window.localStorage object is not deleted when the user empties his cache (clear browsing data). It seems that Chrome's implementation considers an extension's localStorage to be part of the extension. So it only deletes the localStorage when the user removes the extension.

In Firefox's WebExtensions, the window.localStorage of a WebExtension is deleted when the user clears their cache (preferences>privacy>clear your recent history).

I would like to understand if this is a bug, or if this is just a different concept of what control the user should have over the data stored in a WebExtension.

As I am working with WebExtensions, I am trying to keep as few differences as possible between Chrome and Firefox extensions. On Chrome, I used to store preference data in the local storage, because it is persistant. But The fact that the implementation is different on Firefox forces me to use the "storage API", which is Asynchronous. 
As a result my code implementation gets quite different between Chrome and Firefox.

Please let me know your thoughts about this, is it a bug, or is it a feature? :)
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Sorry for the duplicate, thanks!
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.