Firefox 在哪里存储 javascript/HTML localStorage?
我已经制作了一个简单 Web 应用程序的高级功能原型,并且延迟已将其推向“上线”状态。
目前,它仅使用 JavaScript 的 localStorage
工具来跟踪正在发生的情况,但由于偏执,我们不希望它被损坏导致数据丢失(这确实感觉有点粗略)与服务器对话)。
Firefox 在哪里保存其 localStorage
数据库(我认为是 SQLite,但我就是找不到它)?
I have made an advanced functional prototype of a simple web application, and delays have pushed this into the position of going "live".
At the moment, it just uses JavaScript's localStorage
facility to keep track of what's happening, but due to paranoia, we don't want it to be corrupted causing loss of data (it certainly feels a bit sketchy never talking to a server).
Where does Firefox keep its localStorage
database (I think it's SQLite, but I just can't find it)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
§ localStorage
§ localStorage
在 Mac OS X 上,
webappsstore.sqlite
位于~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/
下(其中 xxxxxxxx 是根据 Firefox 配置文件教程)。我使用 Command Line Shell For SQLite 来查看。假设 www.example.com 是一个真实的站点,并且是唯一使用 localstorage 的站点,您可以运行以下命令:
请参阅 Chrome 存储位置的 HTML5 WebStorage 数据是如何物理存储的?。 Chrome 对每个主机名和协议使用单独的 sqlite 文件,而 Firefox 在范围列中使用反向主机名和协议。
有关 Opera 存储,请参阅 sessionStorage 和 localStorage 存储在哪里?地点。 Opera 使用 XML 索引文件和单独的 XML 文件来存储 Base64 编码数据。
On Mac OS X, the
webappsstore.sqlite
is located under~/Library/Application Support/Firefox/Profiles/xxxxxxxx.default/
(where xxxxxxxx is random according to Firefox Profile Tutorial ).I used the Command Line Shell For SQLite to look around. Assuming www.example.com was a real site and the only site using localstorage, you can run these commands:
See How is HTML5 WebStorage data physically stored? for the Chrome storage location. Chrome uses individual sqlite files per hostname and protocol, where Firefox uses the reversed hostname and protocol in the scope column.
See Where the sessionStorage and localStorage stored? for the Opera storage location. Opera uses an XML index file and individual XML files for the Base64 encoded data.
从 LSNG 开始,本地存储也可以在配置文件目录中找到
存储/默认/
。As of LSNG, local storage is also found in the profile directory under
storage/default/
.