0

as described here: http://www.mobilexweb.com/blog/safari-ios7-html5-problems-apis-review

I want to take advantage of the workaround described.

I tried:

var size = 4, db = openDatabase("db", "v1.1", "db", size * 1024 * 1024);

then I tried:

var size = 40, db = openDatabase("db", "v1.1", "db", size * 1024 * 1024);

And this, I've tried over thousand times the last 24 hours.

Sometimes a prompt appears: "increase up to 5MB?" .. but never one with "increase up to 10 or 25 or 50 …………"

Some time at the beginning of this, it worked! … Crazy. It really worked. But I wasn't sure about how I came to this point .. that's why I started to do it again (and again …) .. but it never worked again :( :(

… 23 hours later …

I have to show it to the client tomorrow, but it doesn't work. damn! That is why you are my last hope!

So If anybody has experience with websql-cache-limit on ios7 … please tell me what I'm doing wrong …

Thx!

John Doe Smith
  • 1,623
  • 4
  • 24
  • 39

2 Answers2

1

Initial request database size has no meaning in iOS.

Workaround is, dump garbage data of your desire storage size in temp db. This should cause to request quota. Then you delete temp db, and create your db.

Kyaw Tun
  • 12,447
  • 10
  • 56
  • 83
  • what do you mean with temp db? and how can i delete a db? .. i thought with websql you can't delete dbs. can you please explain in detail? thx a lot! – John Doe Smith Jan 07 '14 at 00:12
  • Just drop all tables to delete db. You can you use your db instead of temp db name. – Kyaw Tun Jan 07 '14 at 00:24
1

I am editing the answer, as i didn't noticed you already saw that link. but, the same work around works for me. I am initially asking for 1 MB of space and then it works properly.

var db=openDatabase('PermissionDatabase', '1.0', 'PermissionDB', 1 * 1024 * 1024);

As per your answer, it worked initially, try resetting safari to delete all the previous permissions granted and then try again.

GemK
  • 852
  • 7
  • 14
  • thx! So, you just asked for 1MB and you got 50mb? on iPad and iOS7? So not like described in the workaround? Of course, I've resetted safari-app, but maybe the previous permissions are still here. Reset by Settings>Safari>Delete Data. Can you please try to reset and do it again? Because if it won't work again, then I think those permissions are still stored somewhere. hm? – John Doe Smith Jan 07 '14 at 07:39
  • Yes, I was able to store 50 MB in Websql on iPad and iOS7. It works as described in the workaround. First, create a database less then 5MB and then pop ups will appear at 10 MB, 25MB and 50MB. At present, i cant test that again, as i am not having access to it. – GemK Jan 07 '14 at 09:14
  • BTW … the bug is fixed with iOS 7.1 (beta 4) !! – John Doe Smith Jan 30 '14 at 13:08