Access Denied for localstorage in IE10

前端 未结 8 636
灰色年华
灰色年华 2020-12-01 02:38

Yesterday I installed Windows 8 and am now trying to understand why I am getting an \"Access Denied\" message when accessing localstorage. The page is being served on the sa

相关标签:
8条回答
  • 2020-12-01 03:25

    Go to Tools/Internet Options/Advanced and under 'Security' select 'Enable DOM Storage' checkbox. This should fix the problem

    0 讨论(0)
  • 2020-12-01 03:27

    Doubtless there might be many causes of the same symptoms, but here is what fixed this issue for me.

    I had just one of many Windows 7 PCs with IE11 exhibiting the symptom of "Access Denied" on attempting any JavaScript involving window.localStorage from otherwise reputable and well-behaved web sites. Use of Process Explorer revealed that the proximal cause was an ACCESS DENIED when taskhost.exe (acting on behalf of Internet Explorer) tried to open DOMStore\container.dat for Generic Read-Write. In fact, it was worse than that: if I deleted container.dat, the same ACCESS DENIED occurred, even through the file did not exist any more. And, if I deleted the (hidden) DOMStore folder, when taskhost.exe attempted to recreate it, that received ACCESS DENIED as well.

    After two days of chasing false leads, the final solution was this:

    The registry entry:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\LowCache\Extensible Cache\DOMStore\CachePath
    

    (do note the LowCache in that string) was incorrectly set to:

    %USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\DOMStore
    

    when it should be:

    %USERPROFILE%\AppData\LocalLow\Microsoft\Internet Explorer\DOMStore
    

    with the consequence that low-integrity localStorage requests were being directed to medium-integrity regions of AppData disk storage, thus generating ACCESS DENIED errors, and killing the use of JavaScript window.localStorage.

    This registry entry must have been wrong for many years: perhaps a side-effect of enthusiastic take-up of buggy platform previews and so on. This error survived a total removal and re-installation of IE11.

    There is a similar-looking registry entry for the medium-integrity cache:

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Extensible Cache\DOMStore\CachePath
    

    and that is correctly left as:

    %USERPROFILE%\AppData\Local\Microsoft\Internet Explorer\DOMStore
    

    and should not be changed.

    0 讨论(0)
提交回复
热议问题