简体   繁体   中英

How to view javascript HTML5 localstorage?

I'm looking at JS code that uses localStorage.getItem() and localStorage.setItem() . It's storing items somewhere, but I can't find out where.

When I go here (using Mac Chrome):

~/Library/Application Support/Google/Chrome/Default/Local Storage/

there is leveldb but I can't find where the exact items are being stored.

This is the exact code:

if (!localStorage.getItem('myapp')){
    localStorage.setItem('myapp', JSON.stringify({next: 0, items: []}));
}

For example in Google Chrome:

1) open console.

2) go to the Application

3) open storage -> local storage

4) you should see a table with keys and values

在此处输入图片说明

If you asking about "when it is stored on computer disc" it depends from browser and system:

How is HTML5 WebStorage data physically stored?

Where does PERSISTENT file system storage store with chrome?

Where in the filesystem does IE8 store values stored in localStorage?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM