0

In one of my applications observed that "document.cookie" or $cookies is returning empty values and i am unable to access cookies in code even though cookies are visible in the browser. Are there any issues that are already identified in IE browser. The same code is always working fine in Chrome/firefox. Please suggest

Below is the code which we use in our application to read cookies and set it to the request header while making rest calls via angular

var x=$cookies.get(csrftoken);
request.set header({csrf_token :x})

The above code was running without issues but after some time we observed that $cookies is returning "" even when cookies are available in the browser.

we also tried document.cookie which is also giving the same result.

The issue is only in IE and it is not continuous and mostly intermittent.

sivaram
  • 1
  • 2
  • Welcome to stackoverflow. Please provide a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) so that we can help you. – jtate Feb 06 '19 at 18:17
  • I try to make a test with this code https://textuploader.com/1airj in IE 11. this is my testing result. https://i.postimg.cc/Ghw9LT00/37.gif I try to access cookie for long time and I am able to access it without any issue. To narrow down the issue, Can you please inform us which version of IE and which OS build you are using? If possible than try to post a working example that can produce the issue. With that 2 line of code I am not able to produce the issue. It is also possible that any other code affecting the result. – Deepak-MSFT Feb 07 '19 at 02:42
  • This is happening in our client environment and we to were never able to replicate the issue on our own. The issue is with IE 11 browser across all the machines. As i said earlier that was mostly intermittent and – sivaram Feb 20 '19 at 17:04
  • For testing purpose, I suggest you to reset the IE on that problematic machine to check whether it helps to solve this issue or not. – Deepak-MSFT Feb 26 '19 at 09:38

0 Answers0