user1178044
user1178044

Reputation: 36

Local Storage Database size

I am creating an application which runs on Safari/Chrome and iPad. I am using an HTML 5 database to store the data with a library which decides itself whether to use an indexed db or websql as per the browser. Since each browser has its own storage limit, I want to know is there any way to find out how much space is left in the database so that I can display a message to the user to clear the local database before allowing data to store.

Upvotes: 1

Views: 515

Answers (1)

Silvio Troia
Silvio Troia

Reputation: 1459

By default in Firefox 4, a site can use up to 50MB of IndexedDB storage. If it tries to use more than 50MB, Firefox will ask the user for permission

In Firefox for mobile devices (Google Android and Nokia Maemo), Firefox will ask for permission if a site tries to use more than 5MB

For Chrome browser you can see here: https://developers.google.com/chrome/whitepapers/storage

Upvotes: 1

Related Questions