I am having a tough time understanding how I can delete the whole cookie file that the website creates.
I have the cookie at this location
C:\Users\Test\AppData\Local\Microsoft\Windows\INetCache
. It is being stored in this format
cookie:Test@TestIdentity.net
. Is it possible that I can delete this file using a javascript call.
My website is Test.net but the cookie that is saved is assigned through the Identity provider. So is it going to be an issue accessing the cookie.
I am using this function to iterate over the cookie
function get_cookies_array() {
var cookies = {};
if (document.cookie && document.cookie != '') {
var split = document.cookie.split(';');
for (var i = 0; i < split.length; i++) {
var name_value = split[i].split("=");
name_value[0] = name_value[0].replace(/^ /, '');
cookies[decodeURIComponent(name_value[0])] = decodeURIComponent(name_value[1]);
}
}
return cookies;
}
var cookies = get_cookies_array();
for (var name in cookies) {
console.log(name + " : " + cookies[name] + " ");
}
This function is only giving me one Cookie but when I programatically check the Request.Cookies collection it has four cookies. I am not sure what I am doing wrong here.
The cookie contains Federation Authentication data.
Thanks