views:

270

answers:

2

I work on a WebKit-based app that "runs" several different web apps for a big telco client. Recent Safari versions are slower and slower to write out changes to the shared cookie cache and I am looking for alternatives to handing off a session from Safari to our client WebKit app.

I'd like to use HTML5 database support found in newer Safari versions, which are where our problems lie. I can make a new db fine in Safari, but when I try to use our WebKit client the db is apparently being wiped out and I cannot get a new db created in the client either.

Is there a setting or delegate I need to use to enable HTML5 database support in a WebKit-based app? Can I use a WebKit-based app to access a HTML5 database made in Safari itself (domains will match and its just to handoff a session, after which the table is dropped).

Thanks.

+1  A: 

When you aren't using Safari, it appears that databases are written to ~/Library/WebKit/Databases, which would imply that they aren't shared with Safari databases, which are stored in a different folder.

You might be able to set the WebDatabaseDirectory default to make your application use the same directory structure as Safari, which appears to be ~/Library/Safari/Databases.

John Calsbeek
Yes indeed, adding WebDatabaseDirectory to the webkit app's preferences and pointing to Safari's Databases folder works great. Thanks! Ten google searches turned up nothing close to this simple piece of info.
ExitToShell
A: 

Hi, I've been having a similar problem (although not actually managing to get the database working in the first place). Please see my question and simple example app: http://stackoverflow.com/questions/3190010

subblue