【问题标题】:ie 10 localStorage.getItem returns error: more data is available即 10 localStorage.getItem 返回错误:有更多数据可用
【发布时间】:2014-12-22 21:43:38
【问题描述】:

我在我的 Web 应用程序中使用 localStorage 来保存各种数据。但是,这似乎不适用于 Internet Explorer 10。

当我尝试使用以下方法进行测试时:

localStorage.testItem = "testing"

它工作正常,但是当我尝试时

localStorage.setItem('testItem', 'testing');

我收到一个错误:更多数据可用。这是怎么回事?

【问题讨论】:

  • 我面前有一张“更多数据可用”的屏幕截图。错误,但在 IE8 中。我还不知道原因,但你并不孤单!
  • 我看到的错误是 IE8 和 IE11(绝对最新版本)在引用 localStorage 时抛出“更多数据可用”错误。只需在控制台中输入localStorage 就足以触发它。这似乎是 IE 中的错误,或者是不寻常的环境设置。
  • 刚刚也遇到了这个问题,很惊讶没有找到有关该错误的更多信息。你有想过吗?

标签: local-storage internet-explorer-10


【解决方案1】:

对此我没有可靠的答案,但我已经在远程用户的机器上调试此错误大约一个月了。我没有直接接触过盒子,但我知道的是:

  1. 在我的特殊情况下,对localStorage 的任何引用都会导致“SCRIPT234:有更多数据可用”异常。这与 OP 的问题略有不同
  2. 错误 234:更多可用数据是 low-level Windows system error
  3. 在“工具/Internet 选项/高级/安全/启用 DOM 存储”中是否勾选“启用 DOM 存储”无关紧要,两种方式都会发生错误
  4. 它发生在 IE 11 的最新版本中:IE 11.0.9600.17501
  5. 除了这个 SO 问题外,没有任何关于 IE 内部发生过此错误的记录。这通常是系统级错误。它冒泡到 JS 控制台的事实令人不安。通常,当操作系统向网页展示其内部结构时,该页面可能会进入并窃取一些器官。

最终,错误停止出现,但我不知道实际的修复方法。用户确实在解决问题之前清除了浏览器缓存(可能它已损坏?),但也可能是解决问题的 Windows 更新或其他一些未知更改。在这一点上,我不知道如何重现它,但希望上面的一些信息能帮助下一个遇到它的人。

【讨论】:

    【解决方案2】:

    我们的一位客户遇到此错误并向我们发送了屏幕截图(IE9 Windows 7)。

    我们的网页同样使用了 localStorage。

    我可以确认clearing the cache 解决了这个问题

    1. Select Tools (via the Gear Icon) > Safety > Delete browsing history...
    NOTE: You can also access this menu by holding Ctrl + Shift + Delete.
    
    2. Make sure to uncheck Preserve Favorites website data and check both Temporary Internet Files and Cookies then click Delete.
    Uncheck Preserve Favorites website data; Check both Temporary Internet Files and Cookies; > Delete
    
    3. You will get a confirmation at the bottom of the window once it has successfully cleared your cache and cookies.
    
    Further Troubleshooting
    
    1. Close out of Internet Options. Click on Tools and select Developer Tools.
    
    2. In the Developer Tools window, click on Cache and select Clear Browser Cache...
    
    3. Click Yes to confirm the clearing of the browser cache.
    

    【讨论】:

    • 请从链接中为您的答案添加一些信息。这可能会被打破,您的回答将不再有效。
    猜你喜欢
    • 1970-01-01
    • 2012-03-06
    • 2020-11-10
    • 2019-05-28
    • 2018-08-03
    • 1970-01-01
    • 1970-01-01
    • 2011-06-21
    • 1970-01-01
    相关资源
    最近更新 更多