2

I am facing very weird issue with Angular on IE 11 and Edge 44. I have one web application, build with Angular 6 and there we maintain some values in SessionStorage.

There is one flow where I have to navigate to 3rd party web application for some processing and can come back to my original application within the same window tab.

While navigating to 3rd party application, I store few values in SessionStorage. But when I come back to my application from there, then I couldn't find those stored parameters into Storage.

It's working for Chrome, Safari & earlier versions of IE. But facing this issue, for IE 11 & Edge on specific machines only.

NGR
  • 1,230
  • 2
  • 15
  • 44
  • can you use localstorage instead of sessionstorage? ..cause when you leave the tab (for the 3rd web app ) you loose your data in the sessionStorage .. localstorage is more persistente .. maybe you could do a little hack to overwrite the sessionstorage with localstorage (in your ts/js code) – federico scamuzzi May 09 '19 at 07:13
  • Your server time is the same as the client time? IE drops sessions if the server time is behind the client. – Raphael Mayer May 09 '19 at 07:18
  • @NGR, I made a test with sample code and I am able to produce the issue with MS Edge 44. At present, no any direct solution is available. As a work around you can try to use local storage which may help to avoid the issue. Thanks for your understanding. – Deepak-MSFT May 09 '19 at 10:43

1 Answers1

1

This is a known issue, see: https://support.microsoft.com/en-us/help/316112/prb-session-variables-do-not-persist-between-requests-after-you-instal

Be sure there are no "-" and "_" in your session name. Also be sure to remove IE11 and use Chrome/FF only :)

Also be sure that this Cookie is not created by an iFrame.

Here some resources that may help: https://smartbear.com/blog/develop/internet-explorer-eats-cookies-with-underscores-in/

https://social.msdn.microsoft.com/Forums/ie/en-US/8e876e9e-b223-4f84-a5d1-1eda2c2bbdf4/ie7-cookie-issue-when-domain-name-has-underscore-character-in-it?forum=iewebdevelopment

Cookie blocked/not saved in IFRAME in Internet Explorer

Raphael Mayer
  • 667
  • 6
  • 19
  • Thanks Raphael. I do have variables which contains "_". Let me first install that security patch and get the issue reflect on my machine and then by removing "_", retest the solution. – NGR May 09 '19 at 11:26
  • @NGR, Is your issue solved? please inform us the current status of the issue. we will try to provide further suggestions. Thanks for your understanding. – Deepak-MSFT May 13 '19 at 08:56
  • Hi @Deepak-MSFT We tried removing the the underscores(which we were having earlier in session names) from storage variables and retested. But still the issue persist. – NGR May 13 '19 at 13:55
  • Is there any chances to use local storage as a work around just for IE? – Deepak-MSFT May 13 '19 at 13:57
  • It's bit difficult to use because in that case we have to manage lot many other things. localstorage shares across the tabs and other browser windows. – NGR May 14 '19 at 08:59
  • Never use localstorage for sessions. Never! – Raphael Mayer May 14 '19 at 09:58
  • Can anyone suggest better option or the root cause with IE/Edge? – NGR May 14 '19 at 10:40
  • 1
    Did you check this? https://stackoverflow.com/questions/35066608/ie11-losing-session-or-cookie-info-after-window-open. But this is a client side solution... – Raphael Mayer May 14 '19 at 12:07
  • Maybe add to your template – Raphael Mayer May 14 '19 at 12:11
  • And an alternative to sessionStorage would be indexedDB https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API/Using_IndexedDB – Raphael Mayer May 14 '19 at 12:13
  • https://stackoverflow.com/questions/35066608/ie11-losing-session-or-cookie-info-after-window-open worked for me. – NGR May 15 '19 at 12:28
  • @NGR but this is a client side fix and doesnt help your clients. – Raphael Mayer May 15 '19 at 13:54
  • Right. But only one of the client premise facing this issue with their new machines. Seems like because of some security patch at their end. It's working with same IE/Edge version on other machines. – NGR May 15 '19 at 15:09
  • @NGR, Can you inform them to install the same patch as yours for a testing purpose to check whether it helps to avoid the issue or not? also I suggest you to post your solution as an answer and try to mark it as an answer whenever it is available to mark may help other community members in similar situation. Thanks for your understanding. – Deepak-MSFT May 20 '19 at 06:55