乐闻世界logo
搜索文章和话题

Which browsers do support HttpOnly cookies?

1个答案

1

HttpOnly Cookie is a special type of cookie designed to enhance web application security. It can only be accessed by the server and not by client-side scripts, effectively mitigating certain attack vectors such as Cross-Site Scripting (XSS). Most modern browsers support HttpOnly cookies. The following browsers support HttpOnly cookies:

  1. Google Chrome: Google Chrome has supported HttpOnly cookies since version 1.
  2. Mozilla Firefox: Firefox has supported HttpOnly cookies starting from version 2.0.0.5.
  3. Apple Safari: Safari has supported HttpOnly cookies since version 3.
  4. Microsoft Edge: As Edge is based on Chromium, it natively supports HttpOnly cookies.
  5. Internet Explorer: Internet Explorer has supported HttpOnly cookies since version 6 SP1.

The browsers listed above are mainstream and all support HttpOnly cookies, which significantly enhance website security. For example, in a previous project, we utilized HttpOnly cookies to store user login information. This approach ensures that even if the website has XSS vulnerabilities, attackers cannot steal user cookies via scripts, thereby protecting the user's login session from compromise.

2024年7月26日 21:45 回复

你的答案