Note: Advice in this article will only work for JxBrowser 6. See the corresponding article for JxBrowser 7 here.(注意:本文中的建议仅适用于JxBrowser6,JxBrowser7相应文章请点击这里。)


JxBrowser delegates work with cookies to Chromium engine. Chromium engine decides how to download cookies from a web server, extract them from HTTP headers and store them on a local file system (persistent cookies) or memory (session cookies). By default JxBrowser doesn't modify Chromium's behavior, so support of cookies is enabled by default.(JxBrowser将Cookie委托给Chromium引擎使用。 Chromium引擎决定如何从Web服务器下载cookie,从HTTP标头中提取cookie并将它们存储在本地文件系统(持久cookie)或内存(会话cookie)中。默认情况下,JxBrowser不会修改Chromium的行为,因此默认情况下启用cookie支持。)


To work with cookies, JxBrowser provides CookieStorage and Cookie classes. Using CookieStorage you can access the actual cookie storage to get, modify or remove cookies. The Cookie class allows you to get information about specified cookie.(为了使用cookie,JxBrowser提供了CookieStorage和Cookie类。使用CookieStorage,您可以访问实际的cookie存储,以获取,修改或删除cookie。 Cookie类允许您获取有关指定cookie的信息。)


Supported Protocols (支持的协议)

JxBrowser supports cookies that are sent using the following protocols:(JxBrowser支持使用以下协议发送的cookie:)

  • HTTP(HTTP)
  • HTTPS(HTTPS)
  • WS (WebSocket)(WS(WebSocket))
  • WSS (Secured WebSocket)(WSS(安全的WebSocket))

If the cookie is sent using a protocol that isn't in the list (e.g. ftp://), then they will not be stored in the storage.(如果Cookie是使用列表中未列出的协议发送的(例如ftp://),则它们不会存储在存储设备中。)