基于WebKit的Mac应用程序可以使用Safari中的HTML5数据库吗? [英] Can a WebKit-based Mac app use HTML5 databases from Safari?

查看:156
本文介绍了基于WebKit的Mac应用程序可以使用Safari中的HTML5数据库吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个基于WebKit的应用程序,运行几个不同的网络应用程序为一个大的电信客户端。最近的Safari版本更慢,更缓慢地写出共享cookie缓存的更改,我正在寻找替代方法,将一个会话从Safari到我们的客户端WebKit应用程序。

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.

我想使用在较新的Safari版本中找到的HTML5数据库支持,这是我们的问题所在。我可以在Safari中创建一个新的数据库罚款,但是当我尝试使用我们的WebKit客户端数据库显然被清除,我不能得到在客户端创建一个新的数据库。

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.

有没有一个设置或委托我需要使用在基于WebKit的应用程序中启用HTML5数据库支持?我可以使用一个基于WebKit的应用程序来访问在Safari自己的HTML5数据库(域将匹配,它只是为了切换会话,之后表删除)。

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).

推荐答案

当您不使用Safari时,看起来数据库写入 〜/ Library / WebKit / Databases ,这意味着它们不与存储在不同文件夹中的Safari数据库共享。

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.

您可以设置 WebDatabaseDirectory 默认值,使您的应用程序使用与Safari相同的目录结构,它似乎是〜/ Library / Safari /数据库

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.

这篇关于基于WebKit的Mac应用程序可以使用Safari中的HTML5数据库吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆