WebSQL 被弃用后,如何与 HTML5 离线应用相处?

发布于 12-27 04:08 字数 162 浏览 7 评论 0原文

由于WebSQL已经失去了所有的支持并且开发已经停止,人们如何能够使用HTML5在Web应用程序中实现离线存储。我知道 Google Chrome 和 Safari 仍然将它作为浏览器的一部分,但我想它很快就会消失。那么哪些技术正在取代它?为了拥有离线应用程序而不是使用 webSQL,需要实现哪些不同的东西?

Since the WebSQL has lost all the support and the development being stopped, how are people able to implement Offline Storage in web apps using HTML5. I know Google Chrome and Safari are still having it as a part of the browser but I guess soon it will be lost. So which are the technologies that are replacing it and what are the different things that need to be implemented to have an offline app rather than using webSQL?

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

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

发布评论

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

评论(3

怀念你的温柔2025-01-03 04:08:42

Chrome、Firefox 和 IE10 现在还支持 IndexedDB,它是 WebSQL 的替代品。

Chrome, Firefox and IE10 now also support IndexedDB, a replacement for WebSQL.

海未深2025-01-03 04:08:42

HTML5 支持 localStorage,它允许您在客户端计算机上存储大量数据,有点类似于 cookie。目前所有主流浏览器都支持它。您可以在 http://diveintohtml5.info/storage.html 阅读所有相关内容。

HTML5 supports localStorage, which allows you to store large quantities of data on clients' computers, somewhat comparable to cookies. All major browsers support it by now. You can read all about it at http://diveintohtml5.info/storage.html.

月亮是我掰弯的2025-01-03 04:08:42

现在所有主流浏览器都支持 localStorage 和 sessionStorage。

如果您使用 JSON2(google Douglas Crockford 和 JSON2),您可以序列化 JSON 对象以进行本地和会话存储。

它不如使用 SQL 查询那么好,但您可以很好地使用 JSON,并且有一些插件可以帮助您。

localStorage and sessionStorage are supported in all major browsers now.

If you use JSON2 (google Douglas Crockford and JSON2) you can serialize your JSON objects for local and session storage.

Its not as nice as using SQL queries but you can work with JSON pretty well and there are some plugins to help you.

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