What is the maximum size of a Web SQL DB in iOS (Safari) on the iPad? How about LocalStorage?

Clay Nichols picture Clay Nichols · Jun 11, 2012 · Viewed 15.8k times · Source

What is the maximum data size when using HTML5's Web SQL to store data locally on the iPad?

When you reach that, does it just prompt the user to increase it? Is that a simple yes/no permission request? If so, what's the hard limit (beyond which there isn't even the option of the user allowing it to expand)?

Does LocalStorage work the same way?

Answer

Oliver Lloyd picture Oliver Lloyd · Nov 24, 2013

The total limit for all WEB SQL Databases created by your site on Mobile Safari is 50Mb. Users are asked to confirm acceptance above 5Mb and you cannot later increase the size of an existing database, you can only create a new, secondary, db, so you have to plan well and set the size when you first create the db.

var theBiggestDB = openDatabase('databaseName', '1.0', 'My Database', 50*1024*1024);

See this answer: https://stackoverflow.com/a/6281947/1233018