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

后端 未结 6 2179
你的背包
你的背包 2020-12-05 21:03

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 webs

6条回答
  •  眼角桃花
    2020-12-05 21:16

    You can't delete cookies for a domain other than the domain of the current site.

    To do what you are asking requires you have access to the machine (i.e. toolbar installed). Even then it's kludgy.

    The only exception is if you are on a domain where the cookie is using the * wildcard, for example *.stackoverflow.com. If you change a cookie with the wildcard, then all the child sub domains (i.e. blog.stackoverflow.com) will have access and see the change that was made to the cookie.

提交回复
热议问题