2

I am creating a Firefox add-on to store data in the local-storage. But it is limited to 5MB. I want it to be unlimited. Is there any way to make the local-storage space unlimited ?

Thanks in advance.

Shankar Us
  • 292
  • 1
  • 3
  • 18

4 Answers4

2

Like others said it is not possible to allocate unlimited space for local storage, each browser comes with it's own limitations.

Here's a suggestion, local Storage is GRATE for Key, Value pairs, so for any data that exceeds 5MB limit a better approach would be to use a database such as IndexedDB.

Adi
  • 5,560
  • 1
  • 24
  • 37
  • 1
    Using [`Sqlite.jsm`](https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Sqlite.jsm) is another option add-ons have. Or you can write your data to the disc yourself in any format using e.g. [`OS.File`](https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/OSFile.jsm/OS.File_for_the_main_thread) – nmaier Jan 26 '15 at 16:49
1

It is not possoble (its a browser running on users machine not your own).. each browser gives a fixed space for local storage, that you will not be able to increase. also read these links

  1. https://stackoverflow.com/a/9283791/3556874

  2. http://dev.w3.org/html5/webstorage/#disk-space

Community
  • 1
  • 1
Naeem Shaikh
  • 15,331
  • 6
  • 50
  • 88
1

You can have an unlimited storage with WebSQL on Chrome extension only.

https://developer.chrome.com/extensions/declare_permissions

devside
  • 2,171
  • 1
  • 19
  • 23
1

A lot of time had past since this question was asked but since googling still points here, I'm adding suggestion to use IndexedDB as a client side storage instead of LocalStorage to bypass 5MB quota limit.

This is built in DB solution for browsers, with benefits of fast data insertion and big storage capacity (about 1GB or more if needed, limit is only the hard drive)

IndexedDB MDN documentation

Official GitHub Example

There is a lot of good recourses on using IdexedDB (YouTube, GitHub, Articles)

Near Future
  • 175
  • 1
  • 8