Html 在 IE 上查看本地存储内容

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9539877/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 22:54:38  来源:igfitidea点击:

Viewing local storage contents on IE

htmlinternet-explorerlocal-storage

提问by govin

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.

如何在 IE 中查看 HTML5 本地存储的内容?Chrome 和 FireFox 提供了一种通过其开发人员工具查看本地存储内容的方法,但我无法使用 IE9 开发人员工具找到该信息。

回答by Alex

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".

由于 localStorage 是一个全局对象,您可以在开发工具中添加一个监视。只需进入开发工具,转到“watch”,单击“Click to add...”并输入“localStorage”。

回答by LainZero

In IE11, you can see local storage in console on dev tools:

在 IE11 中,您可以在开发工具的控制台中看到本地存储:

  1. Show dev tools (press F12)
  2. Click "Console" or press Ctrl+2
  3. Type localStorageand press Enter
  1. 显示开发工具(按F12
  2. 单击“控制台”或按Ctrl+2
  3. 输入localStorage并按下Enter

Also, if you need to clear the localStorage, type localStorage.clear()on console.

此外,如果您需要清除 localStorage,请localStorage.clear()在控制台上键入。

回答by murraybiscuit

Edge (as opposed to IE11) has a better UI for Local storage / Session storage and cookies:

Edge(相对于 IE11)具有更好的本地存储/会话存储和 cookie 用户界面:

  • Open Dev tools (F12)
  • Go to Debugger tab
  • Click the folder icon to show a list of resources - opens in a separate tab
  • 打开开发工具 (F12)
  • 转到调试器选项卡
  • 单击文件夹图标以显示资源列表 - 在单独的选项卡中打开

Dev tools screenshot

开发工具截图