Bug 215386 - IndexedDB used storage is not decreases even after clearing off the records
Summary: IndexedDB used storage is not decreases even after clearing off the records
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari 13
Hardware: Mac macOS 10.15
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-08-11 12:02 PDT by Sardeep Lakhera
Modified: 2020-08-11 16:22 PDT (History)
2 users (show)

See Also:


Attachments
IndexedDB sample example (3.33 KB, text/html)
2020-08-11 12:02 PDT, Sardeep Lakhera
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sardeep Lakhera 2020-08-11 12:02:35 PDT
Created attachment 406400 [details]
IndexedDB sample example

Hello Team,

I am trying to write 500 MB data to the IndexedDB on Safari (Version 13.1 (15609.1.20.111.8)). 
Once I add the data, I then cleared the data and repeat the process. Safari storage quota is around 1.2GB, post that it prompt user to allow the website to use more storage.
My expectation is once I cleared the data, my website should again have 1.2GB of space and there should be no prompt to the user. But after few iteration, I can see the prompt to use more storage. If the user denies, any write to the IndexedDB fails even after clearing off all the data.
It only works again only if I delete the database and reload the page.

Steps to Reproduce:
1. Download the attached webpage.
2. Click on the 'Open DB' button.
3. Click on the 'Add 500 MB data' button.
4. Click on the 'Clear all records' button.
5. Repeat step 3-4 few times.

I am using the native javascript IndexedDB library.
Comment 1 Radar WebKit Bug Importer 2020-08-11 16:22:44 PDT
<rdar://problem/66868950>