最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

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

matteradmin9PV0评论

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)

Post a comment

comment list (0)

  1. No comments so far