7

I've got a situation where there is ~190GB of free disk space available on the system hard drive but when I query the storage quota in Chrome using navigator.webkitTemporaryStorage.queryUsageAndQuota() it only reports 186MB as being free.

I have cleared out all of the local database and application storage. I even completely deleted Chrome and its Application Support folder (mac).

The query shows that only a few kb are in use but only 186MB are free. What haven't I thought of that would cause this quota to be reporting so low? Also, it isn't in incognito mode and I made sure that all extensions are disabled

joshontheweb
  • 612
  • 1
  • 6
  • 18
  • what does chrome://quota-internals/ say about your profile directory, errors, etc? – lossleader Aug 09 '17 at 14:56
  • https://stackoverflow.com/questions/17809824/how-to-use-navigator-instead-of-window-webkitstorageinfo-html5-file-system-api/29662985#29662985 – chiliNUT Aug 12 '17 at 17:14

2 Answers2

2

Are you trying to query using chrome and get the entire available disk space? Because I don't believe this is possible using the queryUsageAndQuota() you can only request more or view the current pool size.

Eg mine comes back a little over 1gb when i try

navigator.webkitTemporaryStorage.queryUsageAndQuota ( 
function(usedBytes, grantedBytes) {  
    console.log('we are using ', usedBytes, ' of ', grantedBytes, 'bytes');
}, 
function(e) { console.log('Error', e);  }
);

Here is a good article explaining the pool size, essentially its never going to report more than half of the available disk space and of that any app can only have 20% of that.

If you just have that one 190gb drive you would think you still have around 19gb as the max for the app!

HOWEVER try hitting chrome://quota-internals/ and for me i found the disk space to be 12.59 GB which when i do the calculations again comes in around the 1.5gb mark then minus any installed apps and already used cache space brings it to the quota limit i got earlier. So Perhaps check the profile size directory. You can also see any other entries in the Usage and Quota tab.

user685590
  • 2,464
  • 5
  • 30
  • 42
  • I'm not trying to access the full amount of free space, but I should be able to access 20% of half of the free space as you mentioned. As it stands I am only getting about 1/1000 of the free space allotted. Also, when checking chrome://quota-internals (thanks for that tip btw) it still shows ~190GB free. The mystery remains... – joshontheweb Aug 22 '17 at 05:02
  • @joshontheweb did you ever figure this out, I have seen this on just a single users PC, where it shows 78GB availble via net internals, but only gives around 350MB – Chris Seufert Aug 08 '22 at 01:15
1

You don't need to ask for more temporary storage as the allocation is automatic, and you can't get beyond the maximum limit (as described in the table).

According to Managing HTML5 Offline Storage part of the documentation.

Eren Tantekin
  • 1,461
  • 14
  • 24