How can I view the contents of HTML5 local storage in IE? Chrome and FireFox provide a way through their developer tools to view the contents of local storage but I couldn't find that information using IE9 developer tool.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Since localStorage is a global object, you can add a watch in the dev tools. Just enter the dev tools, goto "watch", click on "Click to add..." and type in "localStorage".
回答2:
In IE11, you can see local storage in console on dev tools:
- Show dev tools (press F12)
- Click "Console" or press Ctrl+2
- Type
localStorage
and press Enter
Also, if you need to clear the localStorage, type localStorage.clear()
on console.
回答3:
Edge (as opposed to IE11) has a better UI for Local storage / Session storage and cookies:
- Open Dev tools (F12)
- Go to Debugger tab
- Click the folder icon to show a list of resources - opens in a separate tab