How to set and delete cookies from WebBrowser Control for arbitrary domains

dr. evil picture dr. evil · Nov 6, 2009 · Viewed 15.5k times · Source

How can I set and delete cookies for a domain in webbrowser control without using Javascript (which doesn't allow to set / delete cookies without navigating to the website first.)

Answer

dr. evil picture dr. evil · Nov 13, 2011

Managed to accomplish this task by combining these 2:

http://support.microsoft.com/kb/815718

and INTERNET_OPTION_END_BROWSER_SESSION - http://msdn.microsoft.com/en-us/library/windows/desktop/aa385328(v=vs.85).aspx