Reputation: 36
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
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