开发者

Can a WebKit-based Mac app use HTML5 databases from Safari?

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 i开发者_开发技巧s dropped).

Thanks.


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.


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: How to enable HTML client-side SQL database in embedded webkit app (test app on github)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜