Sabado 05 Diciembre 2026 16:17:51 GMT+01:00

Netcrook

InicioManifiesto
Noticias
Techcrook
Geocrook
WikicrookEquipoAppContacto
EnglishItaliano

WIKICROOK

HttpOnly cookie

A cookie flag that blocks JavaScript from reading the cookie value directly.

An HttpOnly cookie is a browser cookie marked with the HttpOnly attribute. This prevents client-side JavaScript from reading its value through APIs such as document.cookie. Browsers still send the cookie with matching HTTP requests, so servers can use it to maintain a user’s session.

Setting this flag helps limit the damage from cross-site scripting by making it harder for injected scripts to steal a session cookie directly. It is not a complete defense: malicious JavaScript running on an authenticated page may still be able to send requests as the user, even without seeing the cookie value. Use HttpOnly alongside protections such as secure cookie settings, a restrictive Content Security Policy, and defenses against cross-site scripting and request forgery.

← índice WIKICROOK