javascript jQuery SQlite - 客户端存储

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5561444/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-25 17:37:58  来源:igfitidea点击:

jQuery SQlite - Client Side Storage

javascriptjquerysqlitebrowserclient-side

提问by Srikar Appalaraju

I am looking for JQuery or any other ways to store data on client-side (i.e. browser). I am preferring SQLite as it seems to have support as part of all the latest browsers supporting HTML5.

我正在寻找 JQuery 或任何其他方式在客户端(即浏览器)存储数据。我更喜欢 SQLite,因为它似乎支持所有支持 HTML5 的最新浏览器。

The plan is to basically to incrementally sync data from server-side & provide some search functionality on client-side. Not sure how much sophisticated search I can do with javascript.

该计划基本上是从服务器端逐步同步数据并在客户端提供一些搜索功能。不确定我可以用 javascript 做多少复杂的搜索。

Does anyone know of any such plugins or javascript solutions. Is it viable at all?

有谁知道任何此类插件或 javascript 解决方案。它完全可行吗?

UPDATE:I am looking for sqlite based solution in browser as it provides good support for full text search. Also what are the limitations on size? I know sqlite3 performs well even for data more than 1GB. Does browser have any such size limitations? Is this possible at all??

更新:我正在浏览器中寻找基于 sqlite 的解决方案,因为它为全文搜索提供了良好的支持。还有尺寸有什么限制?我知道 sqlite3 即使对于超过 1GB 的数据也能很好地执行。浏览器是否有任何这样的大小限制?这可能吗??

采纳答案by ctcherry

"HTML5" includes localStoragewhich might work for you, some great info on it can be had here:

“HTML5”包括可能对您有用的 localStorage,可以在此处获得有关它的一些重要信息:

http://diveintohtml5.ep.io/storage.html

http://diveintohtml5.ep.io/storage.html

回答by Daveo

If you planning to store less than 5Mb.

如果您打算存储少于 5Mb。

You could use http://www.jstorage.info/

你可以使用http://www.jstorage.info/

Its not SQL but you can incrementally sync data, use it if it exsit or go to the server if it does not. Plus its cross browswer compatible and works on older browers but not with as much storage

它不是 SQL,但您可以增量同步数据,如果存在就使用它,如果不存在则转到服务器。加上它的跨浏览器兼容并适用于较旧的浏览器但没有那么多存储

回答by EMMERICH

I've heard good things about Lawnchair

我听说过Lawnchair 的消息