Set-Cookie Header Explained

What the HTTP Set-Cookie header does and when it's used.

Published October 14, 2026

The Set-Cookie header instructs the client to store a cookie for future requests.

Key points

  • Should include Secure and HttpOnly flags for any sensitive cookie, like a session identifier
More HTTP articles