Is there any local storage limit in Apache Cordova like in ordinary browser? I want to store large amount of data, and need to know if it has any limit or not... I don't have any sensitive data to store in it.
-
1I strongly recommend [doing a web search](https://duckduckgo.com/?q=apache+cordova+local+storage+limits) before posting. – T.J. Crowder May 30 '21 at 10:54
-
1Does this answer your question? [What is the max size of localStorage values?](https://stackoverflow.com/questions/2989284/what-is-the-max-size-of-localstorage-values) – Kristian May 31 '21 at 07:09
2 Answers
Apache Cordova has a local storage limit of 5 mbs
.
There are some other restrictions on the type of data you can store.
As per the below documentation, you can have different storages linked to Apache Cordova as per your requirement. For instance -
LocalStorage :- Have storage limit of 5 mbs
WebSql :- To store structured data (It also has a limitation of 5 mbs)
IndexedDB :- Though the documentation is not very much clear here, but if you are searching for better indexing and having a large database that can provide features of localStorage and WebSql, I would suggest going for IndexedDB. As IndexedDB is a low-level API for client-side storage of significant amounts of structured data, including files/blobs.
Please refer to the Cordova documentation for storage from here:-
Below is the link to explore more about IndexedDB:-

- 1,098
- 10
- 19
The documentation says of local storage:
Limited total amount of storage (typically around 5MB).
It also lists other options, like WebSQL, IndexedDB, and plug-ins.

- 1,031,962
- 187
- 1,923
- 1,875