Skip to content
Bugwise
Menu

HttpOnly cookie

Also called: HttpOnly, Secure flag

A cookie flag that hides the cookie from page JavaScript, protecting session IDs if the page is attacked.

Definition

Session cookies should be HttpOnly, Secure (HTTPS only) and have a SameSite setting. Testers check these flags in the DevTools cookie table.

In practice

The session_id cookie has no tick in the HttpOnly column, so any injected script could read it.

Related terms

Esc

Type to search the whole site.