Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View localStorage in Internet Explorer - Cannot get name/value pairs

All,

I realize the question of how to view localStorage in Internet Explorer has been answered several times. That's not my question.

Viewing local storage contents on IE

How to view the Localstorage into IExplorer 10? [duplicate]

I did:

  1. Open IE Developer Tools (F12)
  2. Go to Console
  3. type in localStorage

This shows me that there is an object called localStorage that is known to IE. However, I cannot get the name/value pairs like I can from Chrome.

It gives me a way to walk the JavaScript object for localStorage, but I tried expanding all the nodes and can't find my name/value pairs (see screen capture).

IE Developer Tools localStorage

I am trying to view what a specific Plunk is putting into localStorage, the demo for ngStorage.

ngStorage Demo Plunk

Here's what I see in Chrome:

Chrome Developer Tools localStorage

How can I get ngStorage-x and ngStorage-y from Internet Explorer?

Thank you very much in advance for your help!

like image 811
Philip Tenn Avatar asked Nov 09 '22 14:11

Philip Tenn


1 Answers

Using localStorage to look at the data in the console in IE does work.

What is happening in the example you posted is that the code is being ran on another domain.

LocalStorage is sandboxed in a specific domain, including subdomains.

The demo code runs in run.plnkr.co while the page you are viewing is plnkr.co

Therefore ngStorage-x and ngStorage-y is not in the dataset inside IE because you are viewing for plnkr.co.

Chrome offers a resources tab like what you are viewing to inspect other pages, but the chrome console itself would not have access to that pages LocalStorage.

You can manually go to run.plnkr.co in IE, and type localStorage in the console, and you will see ngStorage-x and ngStorage-y values. (After you executed the code in the demo).

like image 83
Norman Breau Avatar answered Nov 14 '22 21:11

Norman Breau