javascript - How to increase local storage space to unlimited for a firefox add-ons? - Stack Overflow

admin2025-04-26  1

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.

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.

Share Improve this question asked Jan 22, 2015 at 9:18 Shankar SengalaniShankar Sengalani 3021 gold badge4 silver badges18 bronze badges 1
  • You can store on user harddrive instead. Using OS.File etc – Noitidart Commented Jan 22, 2015 at 15:57
Add a ment  | 

4 Answers 4

Reset to default 2

Like others said it is not possible to allocate unlimited space for local storage, each browser es 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.

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./a/9283791/3556874

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

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

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

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)

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745647577a311970.html

最新回复(0)