Increase local storage size for a single domain name?

I heard that the maximum size of localStorage is 5bm per domain name, but it is too small for me. Can I increase the size if localStorage? I should notice that my application works only on one device - this is a terminal with chrome.

+4
source share
3 answers

5MB is not always true. The size of the local storage varies from browser to browser (2.5 MB for each source in Google Chrome, 5 MB for each source in Mozilla Firefox and Opera, 10 MB per storage area in Internet Explorer).

Here you can learn more about local storage for each browser. You can also check your browser's local storage here .

If you have a lot of data to store and local storage is not enough for you, you can always try Web SQL (available in WebKit and Opera) or IndexedDB (available in all modern decent browsers)

+6
source

Quote from a Wikipedia article in web storage:

Web storage can be viewed simply as an improvement in cookies, providing a much larger storage capacity (2.5 MB per origin in Google Chrome, 5 MB to its original location in Mozilla Firefox and Opera; 10 MB per Internet storage area Explorer) and improved software interfaces.

And also quoting fron a article by John Resig (published in January 2007):

Storage space

It is understood that with DOM Storage you have significantly more storage space than the typical user agent restrictions on Cookies. However, the amount provided is not defined in the specification and it does not make sense to broadcast the user agent.

If you look at the Mozilla source code, we will see that the default storage size for the entire domain is 5120 KB. This gives you significantly more options than a regular 2KB cookie.

However, the size of this storage area can be configured by the user (therefore, the storage area of ​​5 MB is not guaranteed or implied) and the user agent (for example, Opera can provide only 3 MB, but I will only say the time.)

+1
source

LocalStorage should not be the main form of an embedded browser with HTML5 (eventually IndexDB will come to provide this), but some applications may want more than the standard 5MB LocalStorage. Is there a way to expand LocalStorage quotas? No and no.

:-)

+1
source

Source: https://habr.com/ru/post/1499771/


All Articles