[KongchangAI]
Concept

httpOnly cookie

An httpOnly cookie is a special cookie set by the server that is marked with the HttpOnly flag to prevent access by JavaScript. It is used to store sensitive information such as refresh tokens and provides effective defense against XSS attacks.

Timeline (last 90 days)

Oct 12

An httpOnly cookie is written by the server via the HttpOnly flag in the Set-Cookie response header; no JavaScript (including document.cookie and Fetch/XHR) can read or modify it, and it can only be automatically carried by the browser on matching requests.

Unverified50%
Oct 12

The guide recommends using an httpOnly cookie to carry the refresh token, with the frontend holding only a short-lived access token, and validating every request on the Node API side.

Unverified50%

All Facts (2)

Source Articles