WSS
Web Specification Studio Home

Enterprise Set-Cookie & Privacy Sandbox Inspector

Audit Set-Cookie headers for RFC 6265bis prefix compliance (__Host-, __Secure-), CHIPS partitioning, SameSite CSRF protection, and buffer quotas.

Raw Set-Cookie Header String

Preset:

RFC 6265bis Parsed Attributes

DirectiveValueSecurity Implication
Name__Host-sessionIdPrefix checked
Path/Scope constraint
Domain(host-only)Host-pinned
SecuretrueHTTPS only
HttpOnlytrueXSS shielded
SameSiteStrictCSRF defense
Max-Age86400sOverrides Expires
Byte Size87 bytes / 4096 maxQuota check

Server-Side Code Exporter

// Astro / Cloudflare Pages Middleware
export function onRequest({ cookies }, next) {
  cookies.set("__Host-sessionId", "9a8f27b31c0e", {
    path: "/",
    
    secure: true,
    httpOnly: true,
    sameSite: "strict",
    maxAge: 86400,
  });
  return next();
}

Why does the __Host- prefix forbid the Domain attribute?

Under RFC 6265bis §4.1.3.2, cookies with the __Host- prefix must bind exclusively to the originating fully qualified domain name (host-only). Allowing a Domain attribute would permit sibling subdomains to overwrite or hijack session state.

Why do browsers drop cookies with SameSite=None if Secure is omitted?

Since 2020, all modern browser engines mandate that cross-site cookies (SameSite=None) must be encrypted in transit using HTTPS and include the Secure flag to defend against unauthenticated network eavesdropping and CSRF attacks.

What is CHIPS (Cookies Having Independent Partitioned State)?

CHIPS introduces the Partitioned attribute, allowing embedded third-party iframes (e.g., customer support widgets, payment frames) to store cookies keyed by the top-level site. This prevents cross-site tracking while maintaining session state within embedded apps.

What causes HTTP 431 (Request Header Fields Too Large)?

When numerous or oversized cookies exceed the reverse proxy header buffer limit (typically 4KB–8KB on Nginx, Cloudflare, and AWS ALB), the edge gateway immediately drops the request with HTTP 431 before reaching the backend application.

Try: