-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance browser.storage.local
to allow storing binary data directly
#533
Comments
Another approach to solve this would be to keep Extensions can already save data while in incognito/private mode through Personally just being able to reliably use the CacheStorage API regardless of incognito/private mode would be welcome. |
We discussed this during our in-person meeting at TPAC. In Chrome, the behavior described matches our currently intended behavior for the local and sync storage areas. I believe some (maybe all) of the data types mentioned would work in the Safari representatives mentioned that they are keen for developers to use extension storage APIs, and would be interested in this capability as a result. |
Firefox switched to the IndexedDB backend for |
It's a reasonable question! I'm not aware of any work being done to investigate the feasibility of that. It sounds like something that should be possible, but is still likely a non-trivial amount of work. |
It should be rather simple to implement in the internal JavaScript shim, i.e. the bindings wouldn't be native, but that shouldn't matter as the performance benefit would be bigger anyway. There might be some caveats like enforcing the 10MB storage quota without |
Such implementation (assuming it uses a hardcoded db name like |
I am reaching out to propose an enhancement to the
browser.storage.local
functionality. As it stands, this storage currently only supports values that are serializable to JSON.However, in some scenarios, the ability to store binary data directly can greatly enhance efficiency and performance.
To address this, I recommend integrating support for binary data formats such as
Uint8Array
,ArrayBuffer
, orBlob
without the need for JSON serialization. Certainly, maintaining backward compatibility is crucial, since a lot of existing code relies on the currentstorage.local
API.The text was updated successfully, but these errors were encountered: