D
D
dollar2018-09-25 07:56:53
JavaScript
dollar, 2018-09-25 07:56:53

How to bypass the localStorage limit for an extension?

What are the workarounds in 2018? Or what to use instead of localStorage?

Permissions
"permissions": [
    "tabs",
    "unlimitedStorage"
  ],

I'm trying to save a 10 megabyte string. The total storage limit is 5 megabytes.
How to expand?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
D
dollar, 2018-09-26
@dollar

The correct answer was - indexedDB .
Although this is a powerful tool, it also copes with the simple task of storing a string.
For the test, I saved 30 megabytes - I ate it.
Even unlimitedStorage is not needed, everything works anyway.

V
Vladimir Proskurin, 2018-09-25
@Vlad_IT

Chrome (and firefox) has an unlimitedStorage setting in permissions that allows you to use local storage without restrictions. https://developer.chrome.com/extensions/declare_pe...
Just use chrome.storage.local instead of localStorage

M
Mikhail Osher, 2018-09-25
@miraage

As already suggested by SmInc and Vladimir Proskurin - unlimitedStorage.
If this does not work, try another gzip https://github.com/nodeca/pako

S
stul5tul, 2018-09-25
@stul5tul

1) I would squeeze. Strings compress well
2) https://developer.mozilla.org/en-US/docs/Web/API/I...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question