iPad (iOS 3.2) 不支持 HTML5 readTransaction?

发布于 2024-09-24 20:22:47 字数 550 浏览 2 评论 0原文

我有一个 HTML5 应用程序,它使用 websql 来存储数据。

在可能的情况下,我使用 readTransaction() 方法进行只读 SELECT 查询,使用 transaction() 方法进行 INSERT/UPDATE/DELETE 查询。

我不确定使用 readTransaction() 是否有性能优势,但这似乎是正确的做法。

该应用程序在桌面版 Safari、Chrome、iPhone (iOS4) 上运行良好...但在 iPad (iOS 3.2) 上则不然。当我启用调试控制台(设置 -> Safari -> 开发人员 -> 调试控制台)时,我可以看到它抱怨没有 readTransaction() 方法。

谁能确认 iPad 是否只支持 HTML5 数据库 API 的子集?显然,简单的解决方法是将所有 readTransaction() 调用更改为 transaction(),但我只是想知道是否有人知道为什么 readTransaction() 在 iPad 上不起作用?

我在developer.apple.com 或其他地方找不到任何关于此差异的参考。

I have a HTML5 app that uses websql for storing data.

Where possible, I'm using the readTransaction() method for read-only SELECT queries, and the transaction() method for INSERT/UPDATE/DELETE queries.

I'm not sure if there's a performance benefit to using readTransaction(), but it seems like the right thing to do.

The app works fine on desktop Safari, Chrome, iPhone (iOS4)...but on the iPad (iOS 3.2), it doesn't. When I enable the debug console (Settings -> Safari -> Developer -> Debug Console), I can see that it's complaining that there's no readTransaction() method.

Can anyone confirm if the iPad only supports a subset of the HTML5 database API? Obviously the easy fix is to change all readTransaction() calls to transaction(), but I just was wondering if anyone knows why readTransaction() doesn't work on the iPad?

I can't find any reference to this discrepancy on developer.apple.com or anywhere else.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

落墨 2024-10-01 20:22:47

为了获得确认,您必须交叉几个信息:

1) iPad 3.2 的用户代理字符串如下:

Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10

2) iPad 的 Safari 4.0.4 于 2010 年 4 月 3 日发布(请参阅 http://en.wikipedia.org/wiki/Safari_version_history)

3) readTransaction于 2009 年 9 月 9 日提交到 WebKit 主干(参见 http://trac.webkit.org/changeset /48227

这就是为 iPad 3.2 提供 Safari 4.0.4 的 WebKit 引擎不支持 readTransaction 的原因。

In order to get the confirmation, you have to cross several informations:

1) The User-Agent string for an iPad 3.2 is the following:

Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.10

2) Safari 4.0.4 for iPad was released on April 2010, the 3rd (see http://en.wikipedia.org/wiki/Safari_version_history)

3) readTransaction was commited to the WebKit trunk on September 2009, the 9th (see http://trac.webkit.org/changeset/48227)

This is why the WebKit engine that power Safari 4.0.4 for iPad 3.2 does not support readTransaction.

酒废 2024-10-01 20:22:47

不确定我是否遵循您的逻辑...您是说对 readTransaction 的支持已在 15 个月前(9 月 9 日)提交到存储库; iOS3.2中的Safari版本是在8个月前(4月10日)发布的?

除非我误解你的意思,否则这意味着在 Safari 4.0.4 发布时,readTransaction 支持已经在主干中存在了 7 个月。

您是否混淆了 9 月 9 日和 9 月 10 日?

Not sure I follow your logic here...you're saying that support for readTransaction was commited to the repository 15 months ago (Sep 09); and that the version of Safari in iOS3.2 was released 8 months ago (Apr 10)?

Unless I misunderstand you, that would mean that readTransaction support would have already been in the trunk for 7 months at the point Safari 4.0.4 was released.

Are you confusing Sep 09 with Sep 10, perhaps?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文