Where is data stored when using an HTML 5 Web SQL Database

自古美人都是妖i 提交于 2019-11-27 19:32:31
triangle_man

It's stored in a SQLite database. Here is a browser support chart I found: .

That said, the W3C has officially dropped support for WebSQL in favor of IndexedDB. Here's the equivalent chart for that:

You may also want to look at DataJS, which is a library that abstracts some of the details of local storage and works across browsers:

Hope that helps.

Web SQL locations by system for Google Chrome:

Windows Vista or 7

\Users\_username_\AppData\Local\Google\Chrome\User Data\Default\databases

Windows XP

\Documents and Settings\_username_\Local Settings\Application Data\Google\Chrome\User Data\Default\databases

Mac OS X

~/Library/Application Support/Google/Chrome/Default/databases

Linux

~/.config/google-chrome/Default/databases

Here is one browser example:

On Windows 7, Chrome stores Web SQL (aka SQLite) databases in:

C:\Users\USERNAME\AppData\Local\Google\Chrome\User Data\Default\databases

Each extension or website that uses Web SQL is given its own folder. Within each folder will be a numbered, extensionless file that is an SQLite database. You could open said file with SQLite Database Browser or any SQLite-supported application.

And in case anyone is looking for IndexedDB:

On Mac OS X:

Chrome

  • ~/Library/Application\ Support/Google/Chrome/Default/IndexedDB/<site>.blob (Blob storage)
  • ~/Library/Application\ Support/Google/Chrome/Default/IndexedDB/<site>.leveldb (everything else - just LevelDB)

Firefox

  • ~/Library/Application Support/Firefox/Profiles/<profile>/storage/default/<site>/idb
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!