httpOnly
HttpOnly is a flag that can be set on HTTP cookies to limit access to the cookie from client-side code. When a cookie is marked HttpOnly, it is not accessible through JavaScript (for example via document.cookie) and is sent to the server only with HTTP requests. This helps prevent a stolen session cookie via cross-site scripting (XSS) exploits.
Usage: the server includes the HttpOnly attribute in the Set-Cookie header, for example: Set-Cookie: sessionId=abc123; Path=/;
Limitations: HttpOnly prevents access by JavaScript, but cookies can still be sent to the server in legitimate
Adoption and best practices: Use HttpOnly for session cookies, and combine with Secure (only over HTTPS) and