问题标签 [jstore]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
3 回答
1944 浏览

javascript - Javascript 会话数据存储

有谁知道存储数据以跨网站页面使用的可靠方法?...这是我迄今为止发现的:

  1. Cookies - 没有足够的容量来存储我需要的 atm。
  2. URL 哈希 - 同上
  3. 框架 - 不是我会使用 atm 的方法。
  4. HTML 5 document.localStorage 和 document.sessionStorage - 尚不完全支持
  5. Google Gears - 该网站的用户很可能没有安装这个
  6. YUI Storage - 这听起来很有希望......有人有使用它的经验吗?
  7. jStore - 这听起来也很有希望,但是当我尝试使用演示并重新加载页面时,它丢失了我的输入。有没有人有这个插件的经验?

注意:我不是相关站点的管理员,所以我没有数据库权限,但我可以添加脚本。


编辑:我发现这个有趣的网站将会话变量保存在 window.name 中......它可能也有一些安全问题

0 投票
1 回答
494 浏览

javascript - Android v1.5 w/ browser data storage

I'm trying to build an offline web application which can sync online if the network is available. I tryed jQuery jStore but the test page stop at "testing..." whitout result, then I tryed Google Gears which is supposed to be working on the phone but it is not found.

the code does work on Google Chrome v5.

[edit]

alert(window.google); on the phone is undefined, but is an object in Chrome.

alert(google.gears); does nothing on the phone and jam the javascript, but is an object in Chrome.

[edit 2]

in the phone configuration, gears is activated.

[edit 3]

to be clear, you have to use google.gears database on Android 1.5, and html5's localStorage on Android 2.x