2

I am using the polyfill IndexedDBShim to create a database on iOS Safari 7.1. However, it throws an error in indexeddbshim.min.js (line 118) and then tells me:

"Application cache update failed, because size quota was exceeded."

despite the entire app being 1.06 MB. But I think indexeddbshim is requesting too large a size to start (I believe in iOS 7.1, you need to first request less than 5MB in WebSQL to start before increasing it after)

All I can find is this:

var request = indexedDB.open( "mydbname", 1.0 );

If I try adding in a size variable it doesn't work, and neither does the "const" I found someone else mention online:

//Neither of these options work
var DEFAULT_DB_SIZE = 1 * 1024 * 1024;
var request = indexedDB.open( "mydbname", 1.0, DEFAULT_DB_SIZE );

How can I set the WebSQL initial size?

Don Rhummy
  • 24,730
  • 42
  • 175
  • 330

1 Answers1

1

Inside the indexeddbshim.js file, there is a line like this:

var DEFAULT_DB_SIZE = 4 * 1024 * 1024;

which corresponds to an initial size of 4MB (in version 2.2.1 of the unminified file it is in line 2996).

Edit this line inside indexeddbshim.js to be a different value, and then retry.

Douglas Timms
  • 684
  • 6
  • 20