Security Operations
Which cookie attribute makes a browser send the cookie only over an encrypted HTTPS connection?
Show the answer
Correct answerD. Secure
AWhy not this: Expires sets when the cookie is discarded; it has no effect on transport encryption.
BWhy not this: SameSite limits sending on cross-site requests; it does not require an encrypted connection.
CWhy not this: Domain sets which hosts receive the cookie, not whether the connection must be encrypted.
DWhy this is right: Secure restricts the cookie to HTTPS requests, so it is never sent in clear text.
The Secure attribute tells the browser to include the cookie only in HTTPS requests, so it is not exposed in plaintext HTTP. SameSite is tempting but controls cross-site sending, not whether the connection is encrypted.