ActiveX web browser control is not deleting session cookies even after it's closed
HI ,
I have an C++ application which uses Microsoft Web browser ActiveX control to launch any URL within the application.
The browser is embedded in C++ form and It's working fine with all the feature Microsoft has exposed through Interface(IID_IWebBrowser2).But while any url that is using session cookie has been launched, even after closing the browser the session cookies are not getting deleted. For example if user login info is stored as session cookies,the url is using the cookies and getting launched without asking for user log in info.
But if I close the browser, and again relaunch , the cookies should be deleted and the url will not find the cookies to be used for log in . That is not happening here. Although this is session cookies , it's not getting deleted and being used by embedded browser. However, if the url is launched in IE, it is behaving as expected.
So, Do I need to delete the cookies explicitly? If Yes, How to do that?
Please needs input here.
Thanks in advance.
Re: ActiveX web browser control is not deleting session cookies even after it's close
Are you calling IWebBrowser2::Quit ?
If so, to clear the process's cookies, call
Code:
InternetSetOption(NULL, INTERNET_OPTION_END_BROWSER_SESSION, NULL, 0);
Re: ActiveX web browser control is not deleting session cookies even after it's close
Hi,
I haven't used Quit method instead tried to use the same function from my browser destructure which is getting called while I close the browser. But it didn't work.