How do you delete Internet Explorer Cookies Progamatically?
-
I need to delete user cookies in my application the same way that clicking on Tools/Internet Options.../Delete Cookies... does in Microsoft Internet Explorer. I've found that if I delete the cookies stored in Documents and Settings\MyUserName\Cookies, Internet Explorer still uses the cookies stored in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files. If I delete these cookies manually through explorer, they are permanently deleted. If I enumerate through all the files and directories in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files,using a DirectoryInfo object I am given various html and image files, but no cookie files? Anybody know how to access and delete these cookies programatically?
-
I need to delete user cookies in my application the same way that clicking on Tools/Internet Options.../Delete Cookies... does in Microsoft Internet Explorer. I've found that if I delete the cookies stored in Documents and Settings\MyUserName\Cookies, Internet Explorer still uses the cookies stored in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files. If I delete these cookies manually through explorer, they are permanently deleted. If I enumerate through all the files and directories in \Documents and Settings\MyUserName\Local Settings\Temporary Internet Files,using a DirectoryInfo object I am given various html and image files, but no cookie files? Anybody know how to access and delete these cookies programatically?
Create a cookie with the name same as the name of the cookie you want to delete and make its expiry date as a past date.
-
Create a cookie with the name same as the name of the cookie you want to delete and make its expiry date as a past date.