Showing posts with label ios. Show all posts
Showing posts with label ios. Show all posts

Wednesday, December 02, 2015

Firefox iOS: SecurityError: DOM Exception 18 with openDatabase()

Firefox has been relased for iOS as another Safari/Webkit wrapper, but it's currently unusable with Web SQL due to I think privacy settings.

Bugzilla Bug: SecurityError: DOM Exception 18: An attempt was made to break through the security policy of the user agent.

Here is a very simple test case

Of course you might say, why not just use indexedDB? Well due to it being broken in the initial release in IE6, I mean Safari and Apple's terrible old school, we only update our browser with the operating system approach, that's not practical without doing version sniffing and writing Web SQL to IndexedDb migration logic. fun fun!

Monday, October 19, 2015

Safari - Web SQL - 14 unable to open database file [SOLVED]

Just a quick post, if you ever encounter "14 unable to open database file" in Safari, it's probably due to Safari apparently not properly Garbage Collecting db handles from openDatabase calls.

The solution is simply to re-use your database connections via a connection pool, as is common practice in many other application servers.

Apparently this got a bit better with Safari 8, Safari 7 was much worse.

I solved this myself after reading this issue https://github.com/pouchdb/pouchdb/issues/1068

Tuesday, September 08, 2015

Debugging web apps on iOS from Windows using Firefox's WebIDE

The WebIDE in Firefox Developer edition (Shift-F8) supports Remote Debugging of browsers on  iOS and Android devices all via a single interface.

Once you have connected, just select the tab you want to debug from the Open App drop down menu.

You might need to reboot after installing Firefox Developer Edition for the iOS link to work

Internally it uses Valance

Super useful, especially if you don't have a Mac handy