Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Edge: local/session storage are not working in a new tab

Tags:

I'm working on a Web Application hosted in Azure. I've tried it on MS Edge (build 20.10525.0.0) and got the following problem.

I have a link with target _blank to open in a new tab a page. On the click event of this link, I store some data in the session storage. The new page is retrieving the data to display it. This work fine under Chrome, Firefox, IE 9-10-11.

Under Edge, the storage seems to work fine. Thought, the retrieving is not always working. Sometimes, the first attempt works. Sometimes, it returns null.

I've tried to use the local storage instead of session storage. I've also tried to use window.open instead to the target _blank. Both of these solutions are not working.

Anyone have ideas ?

like image 465
Annie Vincent Avatar asked Aug 27 '15 15:08

Annie Vincent


1 Answers

I had the same problem with localStorage across multiple tabs - it would only work intermittently, or not at all. My solution was to switch to window.indexedDB (see docs on MDN) which works fine in IE10, IE11 and MS Edge (tested on Edge v20.10240).

like image 122
beluga Avatar answered Sep 20 '22 17:09

beluga