Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用HtmlUnit无头浏览器访问网站。
当我使用无头浏览器时,这些网站发送的 cookie 可以存储在我的计算机上吗?
如果是,那么这些 cookie 的保存位置是什么?如何通过 HtmlUnit 将其删除?
使用HtmlUnit.removeCookie()。通常,HtmlUnit 中的 Cookie 是在内存中创建的,而不是序列化到磁盘的。
我在用着
webClient.getCookieManager().clearCookies();