Reputation: 814
Currently looking into various browsers indexeddb limits. Found that Chrome didn't have a hard limit but permissions needed to be given (Source), that Firefox was 50% of local storage (Source) but couldn't find anything for Edge or Safari.
I experimented with Edge and found it didn't have the limit set by IE: 500MB per domain (Source)
Unfortunately navigator.storage.estimate()
doesn't work on Edge https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/estimate
Does anyone have any experience with Edge or Safari regarding this?
Upvotes: 11
Views: 12095
Reputation: 1052
In Safari for iPadOS 14.5.1, a website can use up to 2 gigabytes for IndexedDB.
Upvotes: 1
Reputation: 190
As of 19 October 2020 the accepted answer seems to be disprovable by example, since I have just loaded 30G using indexedDB into both Chrome and Edge (latest versions of both). I did so 1G at a time, with hundreds of objects on each iteration, to allow both browsers ample opportunity to object if they elected to do so. They did not.
The data remained persistent and available over restarts of the browsers. According to the accepted answer, I should have been limited to 4G (20% of 20G, since my disk is 500G, or ">128GB").
Upvotes: 3
Reputation: 21087
Microsoft Edge's IndexedDB limit is 20% of the global max, similar to Firefox and Chrome:
It depends on the device and which version of Edge you're using. The latest version is similar (sic) to Chrome/FF and have the following limits per domain - each domain can take up to 20% of the global limit (which is for all domains):
Source: https://twitter.com/gregwhitworth/status/1020391736974094336
So how big the db can grow per-domain depends on how big your hard drive volume size is.
Safari's IndexedDB limit is unlimited for Desktop, according to: https://developers.google.com/web/fundamentals/instant-and-offline/web-storage/offline-for-pwa
In mobile Safari, apps can use up to 50MB max, whereas desktop Safari allows unlimited storage (and prompts after 5MB)
However, Safari implemented new IndexedDB limits as first tracked in November 2018:
If the size of free disk space is over 1 GB, the default limit is 500 MB; otherwise it is half the free disk space. - WebKit change tracker
Upvotes: 10
Reputation: 747
Don't have much to say about SAFARI, but for the MS Edge, the table shown above in the first answer is accurate as per the documentation provided by MS EDGE as well as if you try MS Edge version 38. For the MS Edge version 42 (which I have installed on the ASUS tablet p027) I can confirm that, the limits and restrictions are very much same as the Chrome are for the Cache Storage API. According to MDN https://developer.mozilla.org/en-US/docs/Web/API/StorageQuota , you can query and request storage usage and quota information. This is an experimental technology, but will give you close enough estimates, and this property is supported on the MS EDGE 42 version (atleast on the above stated tab, and i don't have MS edge 42 installed on my machine/desktop/laptop as you can't install/update it without updating Windows itselt!)... Hope this part of information works for you, if you find better information please share with us. Cheers:)
P.S. But for sure Both Safari and Edge have taken it seriously now and is already in their development priorities. Moreover, Safari 12 or over atleast support PWA to a text/images level upto 50mb on mobile but doesn't support videos.
Upvotes: 0
Reputation: 161
Safari seems to be poorly documented at the moment so I thought I'd share my recent experience with Safari mobile (11.4) / IndexedDB storage limitations.
TLDR: 50MB quota does not apply to IndexedDB storage on Safari mobile (11.4)
Initially I thought that there was a 50MB hard limit for combined total of all offline storage methods (Local+Cache+Session+IndexedDB+WebSQL+Cookies).
I am pulling down 180MB of data over the wire and dumping it straight into IndexedDB (browser reports IndexedDB consumption of 98MB - some kind of internal compression going on here) and Safari (mobile 11.4) happily accepts it in IndexedDB.
The 50MB limit seems to apply only to Local / Cache Storage (possibly others), not IndexedDB - I guess volume % quotas apply here.
Side note: don't bother trying to save space in your IndexedDB by compressing content with LZ-string or similar - the browsers internal compression implementation means that it either makes no difference or actually increases the consumption!
Upvotes: 8