caching - 如何清除 Internet Explorer 8 中的本地存储值

标签 caching internet-explorer-8 local-storage

我使用 IE8 和 jstorage 库来存储数据来代替 cookie。这一切都很好,直到我想清除存储的值。在 Chrome 中,可以通过导航到内容设置页面来实现此操作。然而,在 IE8 中,它仅提供清除 cookie 的选项,而不会清除我存储在本地存储中的值。

有什么想法可以清除这些数据吗?我不想显示“清除缓存”按钮

最佳答案

IE Developer toolbar的控制台面板中尝试localStorage.clear() 。它返回“未定义”,但似乎清除了本地存储。

It is worth mentioning that this function only clears the localStorage of the domain of the current window, not all localStorage values for the browser.

Example: (IE8 issue) If you're website is loading external content within an iFrame, localStorage.clear() won't clear that domain inside of the iFrame unfortunately.

关于caching - 如何清除 Internet Explorer 8 中的本地存储值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12352524/

相关文章:

java - 为什么 Websphere v8.5 服务器即使在重启后仍将 jsp 保留在缓存中?

html - 嵌入框阴影 IE8

javascript - jQuery ie8 对象为空或未定义

jquery - 使用 HTML5 本地存储在页面刷新时保留 jQuery 切换状态

javascript - 自动完成 (jQuery UI) 和本地存储

javascript - 多重解析初始化

caching - C# IUnitOfWork、IRepository 和 IMemoryCache [ASP.Net Core]

javascript - 在 html5 中不缓存图像的最佳方法是什么?

java - 平板电脑上 api 22(5.1.1) 的 picasso 缓存错误

javascript - 在 IE8 中使用 JavaScript 在元标记后直接将 CSS 链接添加到 HEAD