MS Internet Controls and Cookie handling ??
Hi
I'm writing a small app to see IE's session cookies. This is done very easily by writing;
webbrowser1.document.cookie.
But how can I write back a new/altered or edited cookie ?
Or, simply just delete the session cookies all together ?
Please help
- Preben
Re: MS Internet Controls and Cookie handling ??
Might be of use: http://www.vbforums.com/showthread.php?t=406671
Search for "cookies"...it deletes all cookies indirectly rather than through webbrowser directly, but you could probably limit it to the cookies for the current URL...maybe?
Re: MS Internet Controls and Cookie handling ??
Additionally, I found http://66.249.93.104/search?q=cache:...k&ct=clnk&cd=2 (yeah, it's google cache...not on the original site any more). Hope this helps, and if it works please tell me how as I wanna use it too :-)
Re: MS Internet Controls and Cookie handling ??
One thing you can do (and I've tested this myself) is to do exactly as you've already tried...but set EACH cookie element individually:
let's say the cookie is "enc_pass=giormgioejwmgiojeriogm; enc_user=ijmiorjgm,qgioerj,giomj"
You would use:
WebBrowser1.Document.cookie = "enc_pass=deleted"
WebBrowser1.Document.cookie = "enc_user=deleted"
This would effectively delete the cookie (not erase it, I am sure there's another way to do it but this is a start)
You could then set another enc_pass and enc_user afterwards, or do something else that adds another cookie to collect :-)
Re: MS Internet Controls and Cookie handling ??
Thank you man! I owe you one ;)
Worked like a charm!!!!!
THANKS!!!!
Re: MS Internet Controls and Cookie handling ??
I'm playing about with it myself at the moment...way I do it is I split the cookie data using ; as the split point and doing each element of the cookie data separately...dunno if that makes any difference, but it works for me :-)