HTML5 WebStorage数据如何物理存储? [英] How is HTML5 WebStorage data physically stored?

查看:103
本文介绍了HTML5 WebStorage数据如何物理存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用HTML5 WebStorage功能时,我知道某些浏览器(如Chrome)具有开发人员工具,可让用户浏览WebStorage的内容以进行调试和故障排除。



我想知道是否可以在文件系统中查看网络存储的内容。此内容是否存储在位于某个标准位置的文件系统上的文本文件中?或者,这些数据是通过各种浏览器以某种专有二进制格式存储的,并且不是通过浏览文件系统来访问或查看的?



我问这个问题的动机是为了查看是否可以在文件系统上查看WebStorage的内容,作为开发和调试的辅助工具,并且出于好奇也看到了这些数据实际存储的方式。



感谢。

解决方案

Chrome使用SQLite for LocalStorage。 $ b

我通过在本地PC上转到 AppData \Local\Google\Chrome\User Data\Default\Local Storage 来确认这一点,并查看一份文件。当通过文本编辑器查看时,这些文件以SQLite格式3开头。您将需要一个SQLite数据库查看器来查看数据。


In using the HTML5 WebStorage functionality, I know that certain browsers, like Chrome, have developer tools that enable users to browse thru the contents of their WebStorage for debugging and trouble-shooting purposes.

I was wondering if it is possible to view the contents of web storage in the file system. Is this content stored in text files on the file system that are in some standard location? Or is this data stored in some proprietary binary format by the various browsers and is not designed to be accessible or viewable by browsing the file system?

My motivation for asking this question is to see if you can view the content of WebStorage on the file system as an aid to development and debugging, and also just out of curiosity too see how this data is actually stored.

Thanks.

解决方案

Chrome uses SQLite for LocalStorage.

I confirmed this by going to AppData\Local\Google\Chrome\User Data\Default\Local Storage on my local PC and viewing the contents of a file. The files start with "SQLite format 3" when viewed via a text editor. You will need a SQLite database viewer to view the data.

这篇关于HTML5 WebStorage数据如何物理存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆